- Issue created by @bvoynick
Passing attributes to the <picture> tag in the responsive_image element only works if the theme or other template-altering code specifically allows for it.
Do not include the name of an attribute, e.g. "data-my-attribute" in the setting "<img> tag attributes."
Pass that attribute to Media Helper when rendering a responsive image. Use a stable9-based theme, and do not install modules such as Picture Everywhere β that override the responsive-image.html.twig template.
Because the default responsive_image template does not output {{ attributes }}
, the attributes intended for the <picture> tag will not appear anywhere.
Considering adding an optional template override. Similar to Picture Everywhere, but requiring a toggle.
Active
2.0
Code