mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Made display thumbnail generation use original data if smaller
Thumbnail generation would sometimes create a file larger than the original, if the original was already well optimized, therefore making the thumbnail counter-productive. This change compares the sizes of the original and the generated thumbnail, and uses the smaller of the two if the thumbnail does not change the aspect ratio of the image. Fixes #1751
This commit is contained in:
BIN
tests/test-data/compressed.png
Normal file
BIN
tests/test-data/compressed.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 732 B |
Reference in New Issue
Block a user