With the recent addition menu item support #1934248: Add menu item integration the UI is very similar to that of Menu_Icons (which is more geared towards allowing you to upload images for the icons).

I'm wondering what the plan is for such a feature like that in this module, or if you've spoken to the maintainer of that module to possibly see if making that module dependent on the icons api would be a worthwhile endeavor. I could envision a client project that needed both the ability to have icon-font icons built and put in place by a developer as well as the ability for non-technical site admins to be able to upload image files as icons from the admin UI, but I'd be affraid to expose BOTH of these fieldsets in the admin side. It would make more sense if they shared a single fieldset, which could have a way to select between which kind of icon you want to add.

Comments

markhalliwell’s picture

I'm wondering what the plan is for such a feature like that in this module, or if you've spoken to the maintainer of that module to possibly see if making that module dependent on the icons api would be a worthwhile endeavor.

Short answer, yes and yes.

Originally I was thinking that menu_icons could in fact be the "custom" image provider: #1181362: [menu_icons] Merge with Icon API. I mentioned what I was doing to the maintainer in the issue a while back. Although now I'm not entirely too sure if that's the way to go or not. I'm almost wondering if perhaps that module can be left for D6 (as I'm not planning on backporting this module) and just move the same type of functionality in here. I'm noticing a lot of issues that could be (potentially) solved if this module implemented this type of functionality inherently.

What really needs to happen is a fully realized "provider" hook system in Icon API. I've already implemented some of it, but I'm having to dissect the Fontello module (which is where a lot of Icon API's code is coming from).

I just had a talk with my co-worker this morning and might take a slightly different approach than what is currently committed (regarding the dynamic uploading of archive files). I should have more of a solid answer by tomorrow.

jwilson3’s picture

Interested to see where you're going with this. Your mention of "archive files" piqued my interest... what do you mean there?

markhalliwell’s picture

See the Fontello module, which is now a provider for Icon API. It allows the creation of dynamic webfont icon bundles via uploading an archive (zip) file.

Deciphered’s picture

Issue summary: View changes

It's been two years and probably unlikely that this merger will proceed, but leaving the issue open after a further nudging.

achton’s picture

I am also in need of a way to let site maintainers upload images to menu items, and would like to use Icon API for this. However, the current providers are mainly focused on actual icons (naturally, since this module was born from integrations with 3rd party iconfont providers), not images. Also, we have no way of uploading images on-the-fly.

I think the best way to solve this use case (and potentially many others) would be to create a new core integration called "Upload provider" or something to that effect. The idea would be that instead of it pulling available icons from a font provider or an archive file, it would be configurable via upload fields (file entities rendered as images). This means that you could plug this provider into any current integration (blocks, fields, input filters etc), and that you could separate permissions such that one set of users were able to update the provider with new icons/images, whereas others could update eg. menu items with whatever images were available from the provider. Further more, it could fairly easily integrate with image styles, Picture module and other responsive image solutions.

There are edge cases to solve here, like how to handle removed images from the provider (alert the user that she is about to remove an image which is in use?) and the UX when the select widget needs to give access to easy updating of available images in the provider admin screen (if user has permission), but I think it can be solved. There is also #2370899: Show icon on icon_selector dropdown list to take into account.
This would AFAICT make modules like Menu Icons completely obsolete.

mastoll’s picture

And in the mean time, Menu Icons is the way to add icon images to menu items?