Skip to content
Extraits de code Groupes Projets
Valider 87f10d47 rédigé par Yamagishi Kazutoshi's avatar Yamagishi Kazutoshi Validation de Eugen Rochko
Parcourir les fichiers

Set false to animated options for thumbnail processor (#4547)

Resolve #3199

Fix the aspect ratio of animated GIF whose background is transparent.
parent 41c3389d
Branches
Étiquettes
Aucune requête de fusion associée trouvée
...@@ -8,7 +8,7 @@ module AccountAvatar ...@@ -8,7 +8,7 @@ module AccountAvatar
class_methods do class_methods do
def avatar_styles(file) def avatar_styles(file)
styles = { original: '120x120#' } styles = { original: '120x120#' }
styles[:static] = { format: 'png' } if file.content_type == 'image/gif' styles[:static] = { animated: false } if file.content_type == 'image/gif'
styles styles
end end
......
...@@ -8,7 +8,7 @@ module AccountHeader ...@@ -8,7 +8,7 @@ module AccountHeader
class_methods do class_methods do
def header_styles(file) def header_styles(file)
styles = { original: '700x335#' } styles = { original: '700x335#' }
styles[:static] = { format: 'png' } if file.content_type == 'image/gif' styles[:static] = { animated: false } if file.content_type == 'image/gif'
styles styles
end end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter