Laravel 8,9,10  / Intervention Image Class - class not found - Solved

Laravel 8,9,10 / Intervention Image Class - class not found - Solved

Jul 06,2024

I struggled with this issue for hours. I even searched the internet for solution but everything that was suggested did not work for me.

Finally I found a Solution and here is how to solve it:

If you are like me and you are sure that the package is installed and that you added these lines to your app config file:

Providers array:

Intervention\Image\ImageServiceProvider::class

And Alliases array:

'Image' => Intervention\Image\Facades\Image::class

The you need to follow these steps to solve it:

1. Open your composer.json file

2. Remove the following line:

"intervention/image":"^2.7" or something similar

From require object

3. Save changes

4. open terminal and run the following command:

composer require intervention/image:^2

5. Refresh your app. The issue should be solved