Intervention Image Class, Facades, Providers Not Found in Laravel

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

AuthorDevendra Dode

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

Your email address will not be published. Required fields are marked *