修复图片太大缩略导致内存不足

This commit is contained in:
Edward Yang 2023-01-05 14:27:47 +08:00
parent b91d0184a2
commit 94c3094c18
1 changed files with 1 additions and 0 deletions

View File

@ -77,6 +77,7 @@ class ImageService
$newImagePath = public_path($newImage);
if (!is_file($newImagePath) || (filemtime($this->imagePath) > filemtime($newImagePath))) {
ini_set("memory_limit", "-1");
create_directories(dirname($newImage));
$img = Image::make($this->imagePath);