]> cat aescling's git repositories - mastodon.git/commitdiff
Add coalesce option to avatar and header convert processor (#4552)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Tue, 8 Aug 2017 13:49:14 +0000 (22:49 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Tue, 8 Aug 2017 13:49:14 +0000 (15:49 +0200)
Resolve #3199

app/models/concerns/account_avatar.rb
app/models/concerns/account_header.rb

index a6527a85bc2fbf1e49098ded5c2b8bc04abf6250..8a5c9a22c3e96c414125a6ca70e921934d41692a 100644 (file)
@@ -8,7 +8,7 @@ module AccountAvatar
   class_methods do
     def avatar_styles(file)
       styles = { original: '120x120#' }
-      styles[:static] = { format: 'png' } if file.content_type == 'image/gif'
+      styles[:static] = { format: 'png', convert_options: '-coalesce' } if file.content_type == 'image/gif'
       styles
     end
 
index 4ba9212a25d7d9728200590812fbce477b87629a..aff2aa3f90cc1f1038baeeaa2990e20142c8474d 100644 (file)
@@ -8,7 +8,7 @@ module AccountHeader
   class_methods do
     def header_styles(file)
       styles = { original: '700x335#' }
-      styles[:static] = { format: 'png' } if file.content_type == 'image/gif'
+      styles[:static] = { format: 'png', convert_options: '-coalesce' } if file.content_type == 'image/gif'
       styles
     end