Fix #3807: Increase avatars to 400x400 max (#6651)

But do not upscale when they are smaller
This commit is contained in:
Eugen Rochko
2018-03-06 06:29:01 +01:00
committed by GitHub
parent e9e475a29d
commit 78d772af86
2 changed files with 6 additions and 2 deletions

View File

@ -7,8 +7,8 @@ module AccountAvatar
class_methods do
def avatar_styles(file)
styles = { original: { geometry: '120x120#', file_geometry_parser: FastGeometryParser } }
styles[:static] = { geometry: '120x120#', format: 'png', convert_options: '-coalesce', file_geometry_parser: FastGeometryParser } if file.content_type == 'image/gif'
styles = { original: { geometry: '400x400#', file_geometry_parser: FastGeometryParser } }
styles[:static] = { geometry: '400x400#', format: 'png', convert_options: '-coalesce', file_geometry_parser: FastGeometryParser } if file.content_type == 'image/gif'
styles
end