0

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.

Edward
  • 3,429
  • 2
  • 27
  • 43

2 Answers2

0

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.

Chris Heald
  • 61,439
  • 10
  • 123
  • 137
0

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

Steven Garcia
  • 2,814
  • 2
  • 24
  • 12