First thing first, anyone who is working professionally with Ruby on Rails should ask himself a question: why I need another image handler? Paperclip / Attachment fu / [insert your favourite image handler name here] is already doing a trick.
Sure, there are already popular and well tested solutions but the significant difference between Dragonfly and other solutions is: Dragonfly generate images on the fly as opposed to when uploaded.
It may sound just like a small implementation detail but it opens a wide range of new possibilities.
Advantages of Dragonfly
First, RoR developer does no longer specifies thumbnail sizes in the model, but he is doing so… in the view. So, when later in the development or maintain process image sizes change, the only thing to do is to change a line in a view, instead of reprocessing all of the already uploaded images !
Another important implication is custom avatar cropping for each user (for blog posts with different image sizes or similar Rails applications) becomes trivial. This would be far more difficult if thumbnails were created on upload.
Dragonfly isn’t a solution dedicated for Rails users only, but for anything using Rack. It can be used as a standalone Rack application, or inserted as middleware into any Rack stack, e.g. with Sinatra, Merb, etc. Using with Rails is designed to be super-easy though, so user of Paperclip or similar image handlers should find Dragonfly solution familiar.
Example:
model:
class Album some_macro_method :some_image end
view:
<%= album.preview_image.url("300x200") %>; ... <%= album.preview_image.url("100x100!") %>; ...etc.

June 9th, 2010 on 08:30
Great information! I’ve been looking for something like this for a while now. Thanks!