Skip to content
Extraits de code Groupes Projets
Valider 300f592a rédigé par maxwell's avatar maxwell
Parcourir les fichiers

do not process gifs, just let them be.

parent 2bd15bf3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -19,6 +19,7 @@ class ImageUploader < CarrierWave::Uploader::Base ...@@ -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 ...@@ -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
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter