In my app, I have a search page filled with results from scraped content. Each result includes an image sourced from an external URL.
My goal: To ensure that each image has the same size and can be placed within Bootstrap's grid system.
<%= cl_image_tag product.link, :gravity=>"auto:0", :crop=>"scale", class: "img-responsive" %>
The rendered HTML code looks like this:
<img src="https:site.com.image.jpg?sw=1920&sh=950&sm=fit">
However, the images come in varying sizes such as:
- 1920 x 950 px
- 1080 x 1514 px
- 1860 x 2790 px
Since I am using Bootstrap's grid system, I want the images to fit neatly into a div.col-xs-3 grid system.
Unfortunately, my test results are unsightly as they never match in format and quality is compromised. I attempted resizing through Cloudinary and the cl_image_tag helper, but the outcome always falls short.
Thank you for any assistance or advice you can provide.