降低缩略图质量
This commit is contained in:
@@ -567,7 +567,7 @@ class ImageService
|
||||
$height = (int)($h * $scale);
|
||||
}
|
||||
|
||||
$img->fit($width, $height, fn($constraint) => $constraint->upsize())->encode('png')->save($pathname);
|
||||
$img->fit($width, $height, fn($constraint) => $constraint->upsize())->encode('png', 60)->save($pathname);
|
||||
$img->destroy();
|
||||
} catch (\Throwable $e) {
|
||||
Utils::e($e, '生成缩略图时出现异常');
|
||||
|
||||
Reference in New Issue
Block a user