3

How to save image as progressive image using paperclip/Imagemagick?

Code I am using:

has_attached_file :photo, {
      :styles => {
          :medium => ["200x200#", :jpg] ,
          :small => ["192x256#", :jpg], 
          :thumb => ["50x50#", :jpg],
          :small_thumb =>["30x30#", :jpg] 
        },
        :convert_options => { 
          :medium => "-quality 60",
          :small => "-quality 60",
          :thumb => "-quality 60",
          :small_thumb => "-quality 60" 
        },
      :default_url => "/assets/default_:style.png" }.merge(PAPERCLIP_STORAGE_OPTIONS)

1 Answer 1

5

Simply add -interlace Line in the convert_options of your choice.

Doc states explicitly:

Use Line or Plane to create an interlaced PNG or GIF or progressive JPEG image.

1
  • Also, i realize that you cant add 'original' in the convert options.
    – Pramodh
    Sep 17, 2015 at 7:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.