mirror of
https://github.com/discourse/discourse.git
synced 2025-02-01 18:29:46 +08:00
70050a8ba3
`convert_to_jpeg!` is only called if `convert_png_to_jpeg?` and/or `should_alter_quality?` is true. `convert_png_to_jpeg?` can be disabled by setting `SiteSetting.png_to_jpg_quality` to 100. However, `should_alter_quality?` could be true if `SiteSetting.recompress_original_jpg_quality` was lower than the quality of the uploaded file, regardless of file type. This commits changes `should_alter_quality?` so that uploaded png files will use the `SiteSetting.png_to_jpg_quality` value, rather than ``SiteSetting.recompress_original_jpg_quality` value. |
||
---|---|---|
.. | ||
vanilla_import | ||
animated.gif | ||
animated.webp | ||
cropped.png | ||
custom-theme-icon-sprite.svg | ||
downsized.png | ||
fake.jpg | ||
fake.not_image | ||
huge.jpg | ||
image_no_extension | ||
image.svg | ||
large_and_unoptimized.png | ||
large_icon_correct.png | ||
large_icon_incorrect.png | ||
logo-dev.png | ||
logo.jpg | ||
logo.png | ||
not_an_image | ||
png_as.bin | ||
pngquant.png | ||
resized.png | ||
should_be_jpeg.heic | ||
should_be_jpeg.png | ||
smallest.ico | ||
smallest.png | ||
svg.png | ||
tiff_as.bin | ||
webp_as.bin |