0

I am using the Paperclip gem to resize images. I have noticed some strange behaviour between the conversions locally in my development environment, and on the server at Heroku.

Specifically, when uploading the same source image to each environment, a resulting image size is different.

My config for the attached file in my model:

has_attached_file :image, :styles => { 
      :regular => "900x", 
      :retina => "1800x", 
      :thumb => "96x96#"
    }

The resulting file sizes for the :retina version are ~400k locally and ~1Mb on Heroku.

Is this the result of different imagemagick installs between the two environments? Is there some way to control this behaviour so that the resulting files will at least have consistency?

4

1 回答 1

1

您可以使用

:convert_options => { :all => '-compress JPEG -depth 8'} # or another compression method

标准化您的调整大小。

在这里您可以找到可以在 imagemagick 中设置的所有选项。

于 2013-06-19T01:13:23.333 回答