I have image uploads working like so
#user.rb
has_many_attached :images
<%= f.label :user_images %>
<%= f.file_field :user_images, multiple: true %>
I know how to resize images in the view e.g. image_tag(user.images.first, {size: "300x300"})
The problem with this approach is that it sends the full-size image to the view, then resizes it using CSS, so it can cause a lot of unnecessary use of the network. So I prefer to store multiple sizes when the user uploads the image, then serve the appropriate sized image as required.
How do I do this?