Skip to content
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

Fatal error: Paletter image not supported by webp #1561

Open
chimok opened this issue Sep 24, 2024 · 5 comments
Open

Fatal error: Paletter image not supported by webp #1561

chimok opened this issue Sep 24, 2024 · 5 comments
Labels
[Type] Bug An existing feature is broken

Comments

@chimok
Copy link

chimok commented Sep 24, 2024

Bug Description

I just tried to convert a existing site to webp with performance lab + modern image.

Steps to reproduce

  1. Install and enable both plugins
  2. Change setting to "webp"
  3. Use wp-cli to regenerate all images: wp media regenerate
  4. After a few images it stops with the error

Fatal error: Paletter image not supported by webp in /usr/www/users/xxxxxx/staging-xxxxxx-com/releases/20240924131521/wp-includes/class-wp-image-editor.php on line 592

Screenshots

image

Additional Context

  • PHP Version: 8.1
  • OS: Linux
  • Browser: chromium
  • Plugin Version: 3.4.1 / 2.2.0
  • Device: Desktop

It seems the fix is to convert the image to RGB if it isn't already: https://stackoverflow.com/questions/39292617/fatal-error-paletter-image-not-supported-by-webp

@chimok chimok added the [Type] Bug An existing feature is broken label Sep 24, 2024
@github-project-automation github-project-automation bot moved this to Not Started/Backlog 📆 in WP Performance 2024 Sep 24, 2024
@adamsilverstein
Copy link
Member

Hey @chimok - thanks for the bug report and the link to a potential solution.

If you identified the image that the error is thrown on, can you upload it here as a testing artifact?

@chimok
Copy link
Author

chimok commented Sep 25, 2024

Hi @adamsilverstein, the image is from my customer. I'm not sure have the permission to share it here.

When I open the image with gimp I get this message, maybe that helps? It seems to be sRGB IEC61966-2.1
Anyway, I miss exception handling in your plugin. No matter what error it is, it should simply skip image instead exit the script.
image

@chimok
Copy link
Author

chimok commented Sep 27, 2024

@adamsilverstein Today I've got the idea to enable image magick on the server and try it again. I can confirm with image magick been able to convert almost all images. So this happens only with GD. If image magick is enabled, wordpress switch to it automatically. Anyway, with AVIF the script simply returned "Killed", I think that is because of old version of image magick.

Only regenerated 428 of 442 images (5 failed, 9 skipped).

@IlyaZha
Copy link

IlyaZha commented Oct 21, 2024

I have same errors with disabled image magick.
@adamsilverstein Image example: Image

@mytory
Copy link

mytory commented Nov 9, 2024

The same error occurs with PNG files processed through https://tinypng.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature is broken
Projects
Status: Not Started/Backlog 📆
Development

No branches or pull requests

4 participants