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

Resolve #3199
lolsob-rspec
Yamagishi Kazutoshi 2017-08-08 22:49:14 +09:00 committed by Eugen Rochko
parent 3962b1f05f
commit 2c729c9376
2 changed files with 2 additions and 2 deletions

View File

@ -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] = { format: 'png', convert_options: '-coalesce' } if file.content_type == 'image/gif'
styles styles
end end

View File

@ -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] = { format: 'png', convert_options: '-coalesce' } if file.content_type == 'image/gif'
styles styles
end end