mirror of
https://github.com/discourse/discourse.git
synced 2025-02-11 22:04:58 +00:00
`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.
412 KiB
2032x1312px
412 KiB
2032x1312px
![](/Discource-C/discourse/raw/commit/69c7ed7b59f196c84b9346b70781479d785f33d5/spec/fixtures/images/large_and_unoptimized.png)