Intervention Image Class, Facades, Providers Not Found in Laravel

[ad_1]

If you want to upload, resize, crop, rotate, watermark, and add various image filters to images using image intervention in Laravel application. And that time you get some error, class ‘intervention image imageServiceProvider’ not found laravel, class ‘intervention image facades image’ not found laravel, use intervention\image\homepage\image;, class intervention image not found 10, 9, 8.

Intervention Image Class, Facades, ServiceProviders Not Found in Laravel

Steps to resolve or fix the error, class ‘intervention image imageServiceProvider’ not found laravel, class ‘intervention image facades image’ not found laravel, use intervention\image\homepage\image, class intervention image not found in laravel 10, 9, 8.

  • Step 1: Add “intervention/image” to composer.json
  • Step 2: Run Composer Install
  • Step 3: Add Service Provider
  • Step 4: Add Aliases
  • Step 5: Resolve Class Not Found Error

Step 1: Add “intervention/image” to composer.json

Open your composer.json file and locate the “require” section. Add the following line:

"require": {
    "laravel/framework": "10.16.0*",
    "intervention/image": "dev-master"
},

Step 2: Run Composer Install

Open your command-line interface (CMD) and run the following command:

$ composer install

If you encounter the warning:

Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.

proceed with the following steps:

$ composer update
$ composer install

Step 3: Add Service Provider

Open the config/app.php file and find the $providers array. Add the following line to register the Intervention Image service provider:

Intervention\Image\ImageServiceProvider::class

Step 4: Add Aliases

Still in the config/app.php file, locate the $aliases array. Add the following line to create an alias for the Intervention Image facade:

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

Step 5: Resolve Class Not Found Error

If you encounter the error “Class ‘Intervention\Image\ImageServiceProvider’ not found,” try running the following command:

$ composer update

Conclusion

That’s it, you have learned how to fix Intervention Image Class Facades Providers Not Found in Laravel.

Recommended Tutorials

[ad_2]

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

GSTIN is 03EGRPS4248R1ZD.

Contact
Jassweb, Rai Chak, Punjab, India. 143518
Item added to cart.
0 items - 0.00