I will predestinate this by saying that this may be wrong. What I'm trying to do is pass the url w / transform to JS using the data- attribute.
Currently, the following is used to create an image tag:
= cl_image_tag(image.asset.filename.to_s, transformation: "scroller", :"data-medium" => image.asset.filename.to_s)
What produces this:
<img src="http://res.cloudinary.com/bucket/image/upload/t_scroller/v1373070863/s1ufy3nygii85ytoeent.jpg" data-medium="s1ufy3nygii85ytoeent.jpg">
What I would like to do is show it (using the t_medium named transition that I configured):
<img src="http://res.cloudinary.com/bucket/image/upload/t_scroller/v1373070863/s1ufy3nygii85ytoeent.jpg" data-medium="http://res.cloudinary.com/bucket/image/upload/t_medium/v1373070863/s1ufy3nygii85ytoeent.jpg">
cl_image_tag is cl_image_tag doing the hard work of creating an image tag with a properly configured URL. This is great, however I cannot find any documentation on how to output the configured URL as a string without an image tag (use data-medium as an attribute). I could manually configure the url, but I was wondering if there is a better way?
source share