Craft CMS Icon Picker
This plugin reads all images in the "icons" folder of your specified subvolumes. You should only upload SVG's in this folder!
This plugin requires Craft CMS 4.x.
For the Craft CMS 3.x plugin version, see 0.x tags.
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require homm/hommicons
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for HOMM Icons.
This plugin reads all images in the "icons" folder of your specified subvolumes. You should only upload SVG's in this folder!
Go to Settings > HOMM Icons:
Here you can choose the desired assets volume which should be scanned.
- Go to Settings > Fields and choose the desired field.
- Within the Field Type choose HOMM Icons
- Upload your SVG icons in your
<VOLUME>/icons
folder
Basic usage in the template (Twig):
{{ svg('@webroot/images/icons/' ~ entry.icon ~ '.svg') }}
Some things to do, and ideas for potential features:
- Add option to choose (an optional) subfolder
- Provide Craft Variable to easily output the icon
Brought to you by HOMM interactive