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
Showing only changes of commit 8d02662eb3 - Show all commits

View File

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