I have a project that is written using PHP
on the top of Laravel 5.7.
I am trying to use intervention/image package to interact with pictures. I want to resize an image and then get the new binaries after the picture has been resized.
So I tried something like this
$originalBinaries = $photo->getContentType(); // this is the original binaries
$image = Image::make($originalBinaries)->fit(230);
Storage::disk('local')->put('thumbnails/filename.jpeg', $image);
However, that write an images on the local storage with 0 bytes. I want to basically save the changes in Image object in memory and then get the new binary so I can write it using Laravel's Storage drive.
How can I get the updated images binaries from the Image
object?