Is there an easy way to specify the jpeg quality of an image to be saved in the paperclip plug-in for rails 3?
Yes, it is pretty easy. Paperclip has an option called :convert_options which can be used for that purpose. It takes parameters that ImageMagick / Ghostscript can accept.
Here is an example:
class User < ActiveRecord::Base
has_attached_file :avatar, :styles => { :thumb => ["100x100>", :jpg] },
:convert_options => { :thumb => "-quality 92" }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With