I'm using the cloudinary
gem and cl_image_tag
helper method to display my images.
<%= cl_image_tag(picture.image, :width => :auto, :dpr => :auto, :responsive_placeholder => "blank") %>
As you can see, I'm adding the :width => :auto
option in the helper method. This helper will create a link of this sort
<img data-src="http://res.cloudinary.com/travelcrumbs/image/upload/dpr_auto,w_auto/v1470821928/hero%20image/footsteps.jpg" class="cld-responsive">
The :width => :auto
option creates a w_auto
request in the created URL.
This way an image with appropriate (depending on the container) width is being requested from the cloudinary CDN. But I would like to change the rounding step to 200px (so that it only requests a different image every 200px.) and need to get a w_auto:200
request in the URL.
How do I do that?