This provides an .optim method for Dragonfly.
This requires you have the 'image_optim' gem in your Gemfile
This provides an .optim method for Dragonfly.
This requires you have the 'image_optim' gem in your Gemfile
| Dragonfly.app.configure do | |
| processor :optim do |content| | |
| io = ImageOptim.new | |
| optimized = io.optimize_image(content.path) | |
| optimized.nil? ? content : optimized | |
| end | |
| end |