Set JPEG compression to 80 for thumbnails #21

Merged
Aaron merged 1 commits from thumbnail-quality into master 2020-12-30 20:05:47 +01:00
1 changed files with 3 additions and 0 deletions

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);