What happens if you do the example here: https://image.intervention.io/v4/getting-started/frameworks
Intervention Image v4 - "Call to undefined method Intervention\Image\ImageManager::read()" – What is the correct way now?
Hi everyone,
I'm facing a frustrating issue after upgrading to the latest Intervention Image v4 (with intervention/image-laravel package).
I keep getting this error:
Call to undefined method Intervention\Image\ImageManager::read()
I was using the Laravel facade like this:
use Intervention\Image\Laravel\Facades\Image;
$image = Image::read($uploadedFile);
But it doesn't work. Some older tutorials and even some parts of the docs still mention Image::decode() from v2.
My Questions:
- Has the
read()method been removed in the latest version? - Is
Image::decode()the new/recommended way now? - What is the correct way to read an uploaded file (
$request->file()) in Intervention Image v4 with the Laravel facade?
I'm also getting driver-related errors sometimes (Argument $driver must be existing class name), so any complete working example with proper config would be super helpful.
Has anyone successfully upgraded their image upload function to the latest version? Please share your working code (especially for resizing + thumbnail + saving with Laravel Storage or direct path).
Thanks in advance!
Please or to participate in this conversation.