mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-02-08 04:24:57 +08:00
![Dan Brown](/assets/img/avatar_default.png)
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
732 B
68x66px
732 B
68x66px
![](/github-mirror/BookStack/raw/commit/3a9caea84609c9cf584ba9c15eed5d2a0db5a6d3/tests/test-data/compressed.png)