-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined constant "Intervention\Image\Drivers\Gd\Encoders\IMG_WEBP_LOSSLESS" #1416
Comments
It seems your GD extension does not support Webp format. You can check with: function_exists('imagewebp'); |
Hello @olivervogel Psy Shell v0.12.7 (PHP 8.2.25 — cli) by Justin Hileman
> function_exists('imagewebp');
= true This extension and intervention both work perfectly if set any value other than 100. |
Thats strange. |
I have been playing around trying to figure this out, depending on the PHP docs:
I have tried also to list all defined constants and did not find It seems like the existence of the constant depends on the |
Ok thanks. I actually didn't knew that the constant is only defined if libgd is compiled with support for lossless webp encoding. The patch 4476d94 is already included and will be available in the next release. |
Ok, thank you for this great package 💚. |
Describe the bug
Trying to process an uploaded image, I receive an exception:
Undefined constant "Intervention\Image\Drivers\Gd\Encoders\IMG_WEBP_LOSSLESS"
.Please note, if I reduce the quality to 99 (or any number but 100) everything works fine.
This issue seems to be more related to
intervention/image
package.Code Example
Expected Behavior
Exploring file:
intervention/image/src/Drivers/Gd/EncodersWebpEncoder.php
:The constant
IMG_WEBP_LOSSLESS
should be defined in appropriate file.Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: