Hey guys) Need your help. I use ext yii2-imagine. I try to save file in quality => 50, but it's not working. Image is always saved in quality => 100. Why can it happen ?
$imagine = new Image();
$photo = $imagine::getImagine()->open($this->uploadedFile->tempName);
$width = $photo->getSize()->getWidth();
$height = $photo->getSize()->getHeight();
if (($width >= $this->width) || ($height >= $this->height)) {
$photo->thumbnail(new Box($this->width, $this->height))->save($this->uploadedFile->tempName, ['quality' => 50]);
}