Can ActiveStorage Serve Images for the Modern Web?
summary
Active Storage can serve modern images but the details matter: lab tests use Google PageSpeed/Lighthouse, a demo app scores 73 to 99 after changes, on-the-fly variants sometimes cost 1.872 seconds to generate, each image lookup runs two DB queries and returns a 302 redirect to cloud storage which can thwart CDN caching. Practical fixes include pre-processing or background jobs via .processed, eager-loading attachments, a small controller monkeypatch to enable CDN caching, and a compressed_attachments table plus view helpers—these solutions work in production.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 0:38What is fast
- 1:52Performance is true
- 2:36Performance pillars
- 3:02Why should I care
- 4:18Google tools
- 5:49What are the measurements
- 8:36Can we use ActiveStorage to serve images
- 9:30What does ActiveStorage do
- 11:01Ease of Use
- 14:00Why ActiveStorage
- 15:35Resize
- 19:29Processing in the Background
- 20:42Processing in the CDN
- 22:26What are your needs
- 23:22Conclusion
related talks
28mFaster websites: integrating next-gen images in your...
30mYour own 'Images as a Service'
30mFast and Beautiful: Modern Image Delivery Techniques
46mFast and Beautiful Modern Image Delivery Techniques
36mFast and Beautiful: Modern Image Delivery Techniques
22mHow to migrate to Active Storage without losing your mind
26mFast and Beautiful Modern Image Delivery Techniques
34mInside Active Storage: a code review of Rails' new framework
