图片上传到 storage 下面,裁剪报错?
利用 Storage
facade 上传图片之后,再裁剪报错
上传:
.
.
$path = $file->storeAs($folder_name, $file_name, $disk);
.
.
裁剪:
.
.
dump($file_path); // http://bbs.test/storage/images/avatars/201903/21/1_SAyyrvmxhumeZoqn.jpg
$image = Image::make($file_path);
$image->resize($max_weight, null, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
});
.
.
报错:
推荐文章: