imgix-rails
imgix-rails copied to clipboard
ix_picture_tag helper sets custom alt: attribute on the <picture> tag instead of <img> tag
Rails' regular image_tag helper allows an optional alt:
option to be passed in. However, in your helpers, notably the ix_picture_tag
, the alt:
option when passed in is applied to the <picture>
tag rather than the <img>
tag which is the HTML standard.
For example:
<%= ix_picture_tag(url,
picture_tag_options: {
alt: "Some custom alt text"
}
) %>
will result in:
<picture alt="Some custom alt text">
...
<img>
...
</picture>
Where the behavior should be (ideally):
<picture>
...
<img alt="Some custom alt text">
...
</picture>
Related to #101