Expected behavior
As stated in responsive-img.html:
otherAttributes:
Any other HTML attributes you want on the img tag, for example "height='100' width='100'"
Actual behavior
But if we pass any attribute in the carousel.html to otherAttributes variable, it does not show the attributes correctly in the html.
{{> components/common/responsive-img
image=stencil_image
class="heroCarousel-image"
fallback_size='1280w'
lazyload='lazyload'
otherAttributes= 'decoding="async"'
}}
Steps to reproduce behavior
- Go to carousel.html and add some attributes within otherAttributes variable as shown in the actual behavior section
- Do view source and you will notice the attributes not rendering correctly in the code
Fix
In responsive-img.html change {{otherAttributes}} to {{{otherAttributes}}}
Expected behavior
As stated in responsive-img.html:
otherAttributes:Any other HTML attributes you want on the img tag, for example "height='100' width='100'"
Actual behavior
But if we pass any attribute in the carousel.html to otherAttributes variable, it does not show the attributes correctly in the html.
Steps to reproduce behavior
Fix
In responsive-img.html change {{otherAttributes}} to {{{otherAttributes}}}