about summary refs log tree commit diff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-08-07 21:41:21 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-08-07 14:41:21 +0200
commit87f10d476cf7a05bc60851c93e3c051eca8c357e (patch)
tree1aa2697a30fe181c4b8d0a1897cecd9a7ac2acb1 /app/models/concerns
parent41c3389d76e3f34bd77ff474dfb4298d5a390dc1 (diff)
Set false to animated options for thumbnail processor (#4547)
Resolve #3199

Fix the aspect ratio of animated GIF whose background is transparent.
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/account_avatar.rb2
-rw-r--r--app/models/concerns/account_header.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/concerns/account_avatar.rb b/app/models/concerns/account_avatar.rb
index a6527a85b..b0ec689a7 100644
--- a/app/models/concerns/account_avatar.rb
+++ b/app/models/concerns/account_avatar.rb
@@ -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
 
diff --git a/app/models/concerns/account_header.rb b/app/models/concerns/account_header.rb
index 4ba9212a2..542e25abe 100644
--- a/app/models/concerns/account_header.rb
+++ b/app/models/concerns/account_header.rb
@@ -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