While working on a prototype for responsive images in core and making it as generic as possible so it will work with other (contrib) modules as well, I need to be able to pass extra data to theme_image (in particular #breakpoints).
I'm now using hook_field_attach_view_alter to decide if something has to be done, if so I add '#breakpoints' to each item and override #formatter (theme_image_formatter) and #theme (theme_picture). This works, but also means that if I want to support colorbox, I have to override 2-3 more theme functions, only to be able to pass #breakpoints all the way to theme_image_style.
Proposal: add $variables['#extra_info'] that's always passes around?
Comments
Comment #13
smustgrave commentedWonder if this is still needed for D10?
Comment #15
quietone commentedThe proposal doesn't met the Criteria for evaluating proposed changes. In this case, there is not demonstrated demand and support for the change.
If there is interest in this re-open the issue and add a comment. Or open a new issue and reference this one.