config_entity_icon
Adds an icon picker to the edit form of any Drupal config entity — node types, taxonomy vocabularies, menus, media types, custom config entities — and stores the chosen icon as a third-party setting on the entity itself.
Built on top of Drupal core's Icon API (11.1+) via the contributed UI Icons module, so any registered icon pack works out of the box: Lucide, Bootstrap Icons, Font Awesome, Iconify, custom SVG packs — pick from whichever you've installed.
Replaces the need for per-entity-type icon modules (node_type_icon, taxonomy_term_icon, …) with a single, generic mechanism that works for every existing config entity type and every future one without code changes.
Features
- Any config entity — admin picks which entity types get the picker via a settings page
- Any icon pack — works with all Icon API providers (Lucide, Bootstrap Icons, Font Awesome, custom packs)
- Third-party setting storage — no schema changes, no new fields, icon travels with the entity's config
- Lightweight resolver service —
config_entity_icon.resolverfor reading + rendering icons from PHP - Auto-placement in existing forms — integrates with the
additional_settingsvertical tab when present - Fully OOP — modern PHP 8.3+, no procedural hooks, attribute-based registration
Requirements
- Drupal 11.1+
- PHP 8.3+
- UI Icons module
- At least one installed icon pack (e.g. Lucide or Bootstrap Icons)
Usage
After installation:
- Visit Administration » Configuration » User interface » Config Entity Icon
- Tick the entity types you want to receive an icon picker (e.g. Content type, Taxonomy vocabulary, Menu)
- Edit any entity of an enabled type — an Icon picker appears on the form
- Render the chosen icon in any template or PHP via the
config_entity_icon.resolverservice
Other icon-related modules
- Lucide — 1900+ beautiful, consistent, hand-crafted SVG icons from lucide.dev.
- Bootstrap Icons — 2000+ free, MIT-licensed SVG icons from icons.getbootstrap.com.
- UI Icons — the Icon API backbone this module builds on.
License
- Module: GPL-2.0-or-later
For installation, usage, and technical details see README.md.