Skip to content
Extraits de code Groupes Projets
Non vérifiée Valider d3a62d26 rédigé par Eugen Rochko's avatar Eugen Rochko Validation de GitHub
Parcourir les fichiers

Fix #6525: Make sure file is opened in LazyThumbnail processor (#6529)

parent 4bc62516
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -8,7 +8,7 @@ module AccountAvatar
class_methods do
def avatar_styles(file)
styles = { original: { geometry: '120x120#', file_geometry_parser: FastGeometryParser } }
styles[:static] = { format: 'png', convert_options: '-coalesce', file_geometry_parser: FastGeometryParser } if file.content_type == 'image/gif'
styles[:static] = { geometry: '120x120#', format: 'png', convert_options: '-coalesce', file_geometry_parser: FastGeometryParser } if file.content_type == 'image/gif'
styles
end
......
......@@ -8,7 +8,7 @@ module AccountHeader
class_methods do
def header_styles(file)
styles = { original: { geometry: '700x335#', file_geometry_parser: FastGeometryParser } }
styles[:static] = { format: 'png', convert_options: '-coalesce', file_geometry_parser: FastGeometryParser } if file.content_type == 'image/gif'
styles[:static] = { geometry: '700x335#', format: 'png', convert_options: '-coalesce', file_geometry_parser: FastGeometryParser } if file.content_type == 'image/gif'
styles
end
......
......@@ -3,7 +3,7 @@
module Paperclip
class LazyThumbnail < Paperclip::Thumbnail
def make
return @file unless needs_convert?
return File.open(@file.path) unless needs_convert?
Paperclip::Thumbnail.make(file, options, attachment)
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