uploads: fix incorrect sample image sizing.

ref: https://danbooru.donmai.us/forum_topics/16935.

Bug: sample images were being generated to be at most 850px width *and*
850px tall. They're supposed to be at most 850px wide with unlimited height.
This commit is contained in:
evazion
2020-05-23 23:29:59 -05:00
parent af50e10c3a
commit dc4a3bcf38

View File

@@ -24,7 +24,7 @@ class UploadService
if media_file.is_ugoira?
sample_file = media_file.convert
elsif media_file.is_image? && media_file.width > Danbooru.config.large_image_width
sample_file = media_file.preview(Danbooru.config.large_image_width, nil)
sample_file = media_file.preview(Danbooru.config.large_image_width, media_file.height)
else
sample_file = nil
end