As far as, I understand after reading your issue that you want to reduce the size of uploaded image before storing it to the cloud storage.
Ryan, as DHH told in the above thread that uploads are considered immutable so Active Storage doesn’t support transforming/resizing the image itself. We’ll need to use the ImageMagick gem to do the resizing.
We keep it simple and use a nice gem which does the work for us.
- We have to add the image_processing gem to your Gemfile.
- After adding gem and bundle install, we can use a variant in view like
<%= image_tag image.variant(resize: “100x100”) %>