ir_image_tag doesn't accept html options
jgillman opened this issue · 2 comments
jgillman commented
Following the convention of image_tag
it would be very convenient to be able to pass in html options like class
or alt
.
Current:
<%= image_tag( ir_url(my_image_url), class: 'my-great-class', alt: 'My image alt text.' ) %>
or even
<img src="<%= ir_url(my_image_url) %>" class='my-great-class', alt='My image alt text.' />
Proposed:
<%= ir_image_tag( my_image_url, class: 'my-great-class', alt: 'My image alt text.' ) %>
I realize this is probably easier said than done, but I'm curious to hear your thoughts on it.
jimmynicol commented
Take a look at the latest commit to master, it should fix this issue so it mirrors your proposed solution. Basically I was not passing the arguments through to image_tag. Currently it supports id
, class
, style
and `alt.