Dependencies

PaperclipOptimizer is currently compatible with Paperclip 3.4.2 up to 4.2.x.

Installation

Add this line to your application's Gemfile after the Paperclip gem:

gem'paperclip-optimizer'

And then execute:

$ bundle

If you wish to set global configuration settings, run

$ rails generate paperclip_optimizer:install

to generate an initializer in config/initializers.

CAUTION

image_optim automatically inserts itself into the asset pipeline and tries to compress your /app/assets/images as well.
Since it enables all libraries it supports by default, you might suddenly run into errors if you do not have all
of them installed.

Please note: settings you made through PaperclipOptimizer only apply to Paperclip attachments, not to image_optims asset compressor.