Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do I create image optimization for Active storagea with Amazon S3 file storage?

Wathon Aung asked in Rails

I want to build posting with image comments web project and included vary of image show cases styles. In case, I implemented that image file upload using Active Storage but it really slow for showing images of many comments with eager load. Help me please.

Reply

How slow is slow? Seconds to load a single image? That's not normal. If it's under a second for many images, that's normal. It's generally slow to load images from AWS S3.

The only thing you can do to increase speed is to implement a CDN, but it complicates your ActiveStorage setup somewhat. Read this: https://medium.com/@tranduchanh.ms/optimize-rails-app-performance-with-rails-amazon-cloudfront-e3b305f1e86c

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.