Once added, this image file may be used as desired in a custom theme

When editing a menu link, this module provides a file field to upload an image to associate with a menu item. In the array returned by menu_link_load, the fid of the image file is contained in [options][content][image]. This may may be passed as a parameter to file_load to obtain its public:// uri, and further used with either file_build_uri or image_style_url to populate the src= attribute of an <img>.

While somewhat similar to Menu Icons, in that it creates an attribute in the menu link's options array, this module does not involve the theme layer whatsoever. It is up to the developer of a custom theme to write code to render an image for a menu item where appropriate.

This module can be made even more powerful when used in conjunction with Menu Reference. The relationship created between a node and a menu item may be leveraged to further enhance site navigation; for example, to display a grid of links, images and descriptions for menu items that are children of the content currently being viewed.

Development sponsored by O3 World.

Project information

Releases