I’m using Dragonfly and would like to have a default image that resizes in the same way present thumbnails do.
I currently have the following code, but when Dragonfly uses the fetch_file method, it tries to process a thumbnail but the resulting URL is a dead link.
if listing.image
image = listing.image.jpg
else
image = Dragonfly[:images].fetch_file('/toekomst/images/speech-bubble.png')
end
image_tag image.jpg.thumb(size).url, :class => "framed"
I can’t find much help on line for this, so any hints are most appreciated! Thanks!
I managed to get this fixed by first adding the config code provided by Mark.
I was then getting this error in my logs:
Since ImageMagick can’t seem to use a path name relative to the project, I had to assign an absolute path. Like this: