Intervention / image

PHP Image Processing
https://image.intervention.io
MIT License
13.84k stars 1.5k forks source link

Class "Intervention\Image\ImageServiceProvider" not found in intervention/image 3.3 #1294

Closed amowogbaje closed 7 months ago

amowogbaje commented 7 months ago

Describe the bug I did composer require intervention/image then when I reloaded my page it brought up the ImageServiceProvider not found error Screenshot (13) all these is happening in config/app in my laravel app. how do I resolve this

Environment :

olivervogel commented 7 months ago

See #1279

Farids87 commented 6 months ago

Not applicable for Laravel 9.52 because it requires illuminate/support ^10.0

amowogbaje commented 6 months ago

I also faced the same issue. Comment intervention from your provider class and aliases. Use it directly in your laravel app instead.

You can initialize Image Intervention with this line:

$manager = new \Intervention\Image\ImageManager(
        new \Intervention\Image\Drivers\Gd\Driver()
    );
    $image = $manager->read($imageFile);
Farids87 commented 6 months ago

I finally used jpegoptim instead of intervention/image and it works perfectly.

amowogbaje commented 6 months ago

Okay then but then just in case you would be handling more than jpeg files you can always use the code I pasted to initialize