Merge pull request 'Set JPEG compression to 80 for thumbnails' (#21) from thumbnail-quality into master

Reviewed-on: #21
This commit is contained in:
Aaron van Geffen 2020-12-30 20:05:46 +01:00
commit 71b71f8a03

View File

@ -256,6 +256,9 @@ class Thumbnail
if (!is_dir(THUMBSDIR . '/' . $this->image->getSubdir()))
mkdir(THUMBSDIR . '/' . $this->image->getSubdir(), 0755, true);
// No need to preserve every detail.
$thumb->setImageCompressionQuality(80);
// Save it in a public spot.
$thumb->writeImage(THUMBSDIR . '/' . $this->image->getSubdir() . '/' . $thumb_filename);