spatie / laravel-medialibrary

Associate files with Eloquent models
https://spatie.be/docs/laravel-medialibrary
MIT License
5.78k stars 1.08k forks source link

Palette image not supported by webp #3706

Closed nezocks closed 1 month ago

nezocks commented 2 months ago

Converting from PNG to WebP with a "big" conversion doesn't work on the API part, but it seems to work fine on the web. Here is the conversion code: $this->addMediaConversion('big') ->performOnCollections('images') ->format('webp');

Here's the error code: imagewebp(): Palette image not supported by webp {"exception":"[object] (ErrorException(code: 0): imagewebp(): Palette image not supported by webp at /home/forge/{domain}/vendor/spatie/image/src/Drivers/Gd/GdDriver.php:166)

GhostvOne commented 2 months ago

Same here, with this image image psd

Maybe the fix should be like that : https://stackoverflow.com/questions/39292617/fatal-error-paletter-image-not-supported-by-webp

timvandijck commented 1 month ago

Hey guys, thank you for the input, the issue should be fixed in the latest verstion of the spatie/image package (which this package depends on):

https://github.com/spatie/image/releases/tag/3.7.4