嗨,我想将上传的图像保存为 2 个版本(普通和缩略图)
这是我正常使用的代码:
$picture = Upload::save($_FILES['picture']);
// Resize, sharpen, and save the image
Image::factory($picture)->resize(200, NULL)->save();
$profile->profile_picture = basename($picture);
这行得通,但我也想为$profile->profile_picture_thumb
.
我试过用不同的变量名重复上述过程$picture_thumb = Upload::save($_FILES['picture']);
。但这对我不起作用。
任何建议将不胜感激。