If you want the encoded result, use ->encode('data-url')
instead of ->save()
.
More info can be found here!
$image = Image::make(file_get_contents($file))->fit(200,200);
$user->avatar = $image->encode('data-url');
I found solution just add
$type
to
$imagedata =Image::make( file_get_contents($file))->fit(200,200)->save($oUser->avatar);
so become
$imagedata =Image::make( file_get_contents($file))->fit(200,200)->save($type,$oUser->avatar);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community