Skip to content

Media Integration

When to Use

Storing icon references as media entities so they can be browsed in the media library and reused across the site.

Decision

Want Use
Icons as a "library" reused across pages Media + Icon source (this guide)
Inline icons in content body CKEditor 5 integration
Per-entity icon field Field API integration

Pattern

Enable ui_icons_media. Create a new media type with source plugin Icon. Each media entity stores one pack_id:icon_id plus optional settings and can be browsed in the standard media library.

Common Mistakes

  • Wrong: creating Icon media entities for every individual icon use → Right: the Field API and CKEditor integrations are simpler when cross-page reuse isn't needed; reserve the media approach for a shared icon library

See Also