Intervention / image

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

Error: Class "Intervention\Image\Drivers\Gd\Driver" not found #1355

Closed Mohsen322 closed 1 month ago

Mohsen322 commented 1 month ago

hello. i just used example code and got this error. php version: 8.1 run on localhost GD library is enable.

` // include composer autoload require './vendor/autoload.php';

use Intervention\Image\ImageManager;

// create image manager with desired driver $manager = new ImageManager( new Intervention\Image\Drivers\Gd\Driver() );

// open an image file $image = $manager->read('test.png');

// resize image instance $image->resize(height: 300);

// insert a watermark $image->place('polygon.png');

// encode edited image $encoded = $image->toJpg();

// save encoded image $encoded->save('example.jpg'); `

olivervogel commented 1 month ago

The error is not coming from this library. Provided that the installation with Composer has been carried out and the specified path of the autoloader exists, something does not seem to be correct. I cannot say more with the information given.

Mohsen322 commented 1 month ago

I followed the instructions in the documentation step by step and used Composer and didn't nothing wrong.