Resize Images with Active Storage in Rails

Опубликовано: 10 Август 2026
на канале: Mike Rogers
3,816
69

Active Storage is built into Ruby on Rails and is a fantastic way to resize images. In this episode we'll go through how to set it up and how to resize images on the fly.

Active Storage Overview: https://edgeguides.rubyonrails.org/ac...

active_storage/variant.rb: https://github.com/rails/rails/blob/m...

ImageProcessing::MiniMagick Documentation: https://github.com/janko/image_proces...

Episode Source Code: https://github.com/MikeRogers0-YouTub...

Dev.to Write up: https://dev.to/mikerogers0/resize-ima...

Chapters

0:00 - What are we going to do?
0:13 - History of Active Storage
0:38 - Setting up Active Storage
1:43 - storage.yml Explained
2:06 - Setting up a new field
3:59 - Where do the files go?
5:00 - Analysing Files
5:55 - Transforming Images Documentation
6:32 - Compress an Image
8:04 - Rotate an image
9:18 - resize_to_limit and resize_and_pad
11:49 - Questions?

Support Me

  / mikerogers0  
https://mikerogers.io
https://www.buymeacoffee.com/MikeRogers0

#ActiveStorage
#RubyOnRails
#ImageResize