Is there a way to resize an existing image to specific dimensions without creating multiple versions?
Currently, I am using Carrierwave and Rmagick to upload images to my Amazon S3 storage bucket. It generates two versions of the image: the original and a 70x70 thumb version.
I considered creating another version at 260x180 size, but I was concerned about adding unnecessary clutter to the storage database. I wondered if it could be done at the view level instead.
I attempted
<%= image_tag(@syllabus.image_url, :size => "260x180") %>
However, it didn't work as expected - the images were not the same size.
In addition, if the image is smaller than the desired output, do different actions need to be taken compared to larger images? Should bigger images be cut while smaller ones are expanded, or will they automatically scale to fit the specified size?