Hi I want to save an uploaded image as 2 versions (normal and thumbnail)
Here is the code I’m using for normal:
$picture = Upload::save($_FILES['picture']);
// Resize, sharpen, and save the image
Image::factory($picture)->resize(200, NULL)->save();
$profile->profile_picture = basename($picture);
This works, but I also want to create a smaller version to $profile->profile_picture_thumb.
I have tried just repeating the above process with a a different variable name $picture_thumb = Upload::save($_FILES['picture']);. But that that did not work me.
Any suggestions would be greatly appreciated.
Upload::save() returns path to saved file, so just easily create new Image instance from it and save smaller version of Image. Something like: