Browse Source

Add coalesce option to avatar and header convert processor (#4552)

Resolve #3199
pull/4/head
Yamagishi Kazutoshi 6 years ago
committed by Eugen Rochko
parent
commit
81c41d8681
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/models/concerns/account_avatar.rb
  2. +1
    -1
      app/models/concerns/account_header.rb

+ 1
- 1
app/models/concerns/account_avatar.rb View 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

+ 1
- 1
app/models/concerns/account_header.rb View 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

Loading…
Cancel
Save