Troubleshooting Refinery CMS and Dragonfly
Refinery uses the Dragonfly gem for file (images and resources) storage and handling.
Dragonfly stores an image once and produces image variations (thumbnails, formats and enhancements) on-the-fly. As this is not the usual way of handling images troubleshooting image problems can be confusing at first.
Dragonfly depends on Imagemagick to do graphics processing. Imagemagick is a standalone application which must be installed on the application server.
If images are not working double-check that Imagemagick is installed.
Dragonfly urls contain the information dragonfly needs to produce an image of the appropriate size and format. This is a dragonfly url:
The long string is a base64 encoded string. I used base64decode.com to translate "W1….dXQ" into
Decode the base64-encoded url to see what dragonfly should be doing
Where are the images?
If you are using the default Refinery/Dragonfly configuration your
images will be stored in
The file we used as an example is stored at
I could navigate down the directories and find it.
Dragonfly stores the images using a scheme to ensure that image URLs are unique. There are ways in which you can change the scheme - read the really good Dragonfly documentation to find out more if this is what you need.
Check that the file is still where Dragonfly saved it.
Dragonfly writes a log file to your application's root directory. Look in there if you suspect that dragonfly is failing. Here is the log entry for a successful resize of the image.
D, [2015-04-29T12:41:22.505590 #23697] DEBUG -- : DRAGONFLY: shell command: 'convert' '/Applications/MAMP/www/rockythemoose/public/system/refinery/images/2015/04/21/64eggy22sr_Bullwinkle.jpg' '-resize' '225x255>' '/var/folders/xp/c9lbr76s6qs78fp4fxnxntrh0000gn/T/dragonfly20150429-23697-1hglgc2.jpg'
If the base image doesn't exist, the geometry is unrecognized or imagemagick is not installed it should be reflected in this file.