FIX: use 'resize' option instead of 'thumbnail' when downsizing emojis

This commit is contained in:
Régis Hanol 2015-03-26 18:16:15 +01:00
parent 6493e4f641
commit a87083fa76
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ module Jobs
force_aspect_ratio: SiteSetting.enforce_square_emoji
}
# make sure emoji aren't too big
OptimizedImage.downsize(path, path, 60, 60, opts)
OptimizedImage.downsize(path, path, 100, 100, opts)
end
end

View File

@ -112,7 +112,7 @@ class OptimizedImage < ActiveRecord::Base
#{from}[0]
-gravity center
-background transparent
-thumbnail #{dimensions}#{!!opts[:force_aspect_ratio] ? "\\!" : "\\>"}
-resize #{dimensions}#{!!opts[:force_aspect_ratio] ? "\\!" : "\\>"}
#{to}
}
end
@ -123,7 +123,7 @@ class OptimizedImage < ActiveRecord::Base
-coalesce
-gravity center
-background transparent
-thumbnail #{dimensions}#{!!opts[:force_aspect_ratio] ? "\\!" : "\\>"}
-resize #{dimensions}#{!!opts[:force_aspect_ratio] ? "\\!" : "\\>"}
#{to}
}
end