Question

Does anyone know the location of the rails image gem dragonfly's cache. I don't want to have to regenerate all the different sized versions of images each time I deploy.

I already keep the original files in shared and symlink them to each deploy, but can't work out where the resized versions are.

Was it helpful?

Solution

Dragonfly does not store resized images on disk, which is part of its appeal; it generates resized versions of the image on demand. This is very flexible, but it means that you could take a nasty performance hit if you're always serving images from your Rails processes. You should cache them using something like Varnish or a CDN for best performance.

OTHER TIPS

Actually Dragonfly does provide a to_file() method so you can definitely cache your images. If you are lazy like me and want to do it the easy way, check out the handy dragonfly_helper

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top