]> cat aescling's git repositories - mastodon.git/commitdiff
Set false to animated options for thumbnail processor (#4547)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Mon, 7 Aug 2017 12:41:21 +0000 (21:41 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 7 Aug 2017 12:41:21 +0000 (14:41 +0200)
Resolve #3199

Fix the aspect ratio of animated GIF whose background is transparent.

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

index a6527a85bc2fbf1e49098ded5c2b8bc04abf6250..b0ec689a736030bd76e53b06818fbf11615fe87c 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] = { animated: false } if file.content_type == 'image/gif'
       styles
     end
 
index 4ba9212a25d7d9728200590812fbce477b87629a..542e25abe220ecc5bb303657284686f327b4acc3 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] = { animated: false } if file.content_type == 'image/gif'
       styles
     end