diff options
author | maxwell <maxwell@joindiaspora.com> | 2011-03-18 08:43:18 +0300 |
---|---|---|
committer | maxwell <maxwell@joindiaspora.com> | 2011-03-18 08:43:18 +0300 |
commit | 300f592a649189394b52da724e07934abc7ff002 (patch) | |
tree | 2e37ba61890f34ced4159d97c2ed5fe7eaa8c79d /app/uploaders | |
parent | 2bd15bf3e60321359fb89f50dad3c7da67e8aa38 (diff) |
do not process gifs, just let them be.
Diffstat (limited to 'app/uploaders')
-rw-r--r-- | app/uploaders/image_uploader.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/uploaders/image_uploader.rb b/app/uploaders/image_uploader.rb index 92c18fd28..03a71948a 100644 --- a/app/uploaders/image_uploader.rb +++ b/app/uploaders/image_uploader.rb @@ -19,6 +19,7 @@ class ImageUploader < CarrierWave::Uploader::Base def post_process self.send(:remove_versions!) + unless self.path.include?('.gif') ImageUploader.instance_eval do version :thumb_small do process :resize_to_fill => [50,50] @@ -40,12 +41,13 @@ class ImageUploader < CarrierWave::Uploader::Base self.recreate_versions! self.model.update_photo_remote_path self.model.save + else + false + end end version :scaled_full version :thumb_large version :thumb_medium - version :thumb_small do - process :resize_to_fill => [50,50] - end + version :thumb_small end |