do not process gifs, just let them be.

This commit is contained in:
maxwell 2011-03-17 22:43:18 -07:00
parent 2bd15bf3e6
commit 300f592a64

View file

@ -19,6 +19,7 @@ class ImageUploader < CarrierWave::Uploader::Base
def post_process def post_process
self.send(:remove_versions!) self.send(:remove_versions!)
unless self.path.include?('.gif')
ImageUploader.instance_eval do ImageUploader.instance_eval do
version :thumb_small do version :thumb_small do
process :resize_to_fill => [50,50] process :resize_to_fill => [50,50]
@ -40,12 +41,13 @@ class ImageUploader < CarrierWave::Uploader::Base
self.recreate_versions! self.recreate_versions!
self.model.update_photo_remote_path self.model.update_photo_remote_path
self.model.save self.model.save
else
false
end
end end
version :scaled_full version :scaled_full
version :thumb_large version :thumb_large
version :thumb_medium version :thumb_medium
version :thumb_small do version :thumb_small
process :resize_to_fill => [50,50]
end
end end