我想使用Intervention Image软件包调整图片大小。
当上传小尺寸图片时,我的应用程序运行顺畅。但是当我尝试上传大尺寸图片时,我的应用程序在部署服务器上停止工作!
本地代码运行良好,但在部署服务器上出现以下错误:
(1/1) NotReadableException, 图像源不可读
这是我的代码:
$files= Input::file('image');
foreach($files as $file){
$image_resize = Image::make($file->getRealPath());
$image_resize->resize(300, 300);
$image_resize->save(public_path('images/gallery/small/' .$imageName));
}
我该如何解决这个问题?请向我解释一下。