Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
A small EntityFieldsQuery class extension that will allow one to create a new WeightEtnityFieldQuery and that data will be sorted by the weight module.