Resize and optimise images on upload with ActiveStorage

This posts describes how to reduce the size of images uploaded with ActiveStorage significantly by combining a few optimisations.There are user uploads in the app for other things but the above are specifically for images. DynaBlogger is a Rails app, so for this I use ActiveStorage, which is quickly becoming the standard way of handling uploads in Rails since it's built in the framework and doesn't require additional dependencies or even database migrations for models that require attachments, making things simpler than with other solutions provided that you stick to ActiveStorage's conventions.
Resize and optimise images on upload with ActiveStorage #ruby #rubydeveloper #rubyonrails #activestorage https://rubyonrails.ba/single/resize-and-optimise-images-on-upload-with-activestorage

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles