Resize Images with Active Storage in Rails

12-Dec-2022 1062

We used to have to use gems like Carrierwave & Paperclip to upload files & manipulate images in Ruby on Rails. However we now have a fantastic library built into Rails called Active Storage which handles that for us.

 Setting up Active Storage

The first thing you need to do is run the install script, which will create a migration to add the Active Storage tables to your database.

.

Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle