【发布时间】:2019-04-22 15:35:08
【问题描述】:
我正在使用图像干预库来调整图像大小,我已完成以下步骤:
1- 安装库:作曲家需要干预/图像
2- 代码中的用法:
$file = $request->file('logo');
$destinationPath = 'db_images/public/';
$filename = $file->getClientOriginalName();
$extension = explode(".",$filename)[1];
$name = md5(microtime()).".".$extension;
$image_path = $destinationPath.$name;
$img = Image::make($filename)->resize(254, 179)->保存($image_path);
$file->move($destinationPath,$img);
问题是: 当我尝试使用上述代码上传文件时,这将返回“图像源不可读”。
请帮助我解决这个问题。谢谢
【问题讨论】:
标签: laravel image intervention