[wp-trac] [WordPress Trac] #63773: Palette-based PNG cause failure attempting AVIF/WebP conversion under GD

WordPress Trac noreply at wordpress.org
Thu Jul 31 18:40:17 UTC 2025


#63773: Palette-based PNG cause failure attempting AVIF/WebP conversion under GD
-------------------------------------------------+-------------------------
 Reporter:  adamsilverstein                      |       Owner:
                                                 |  adamsilverstein
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Media                                |     Version:  5.8
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests dev-        |     Focuses:
  reviewed needs-testing                         |
-------------------------------------------------+-------------------------

Comment (by b1ink0):

 I confirmed the fix by uploading a palette-based PNG and everything
 converted to WebP properly without any PHP errors. To double-check, I
 commented out the `imagepalettetotruecolor` logic and got the expected
 "Palette image not supported by webp" error, so the fix is working.

 Also tested this patch with the Modern Image Formats 2.5.1
 [https://wordpress.org/plugins/webp-uploads/] plugin active as an
 additional test case and had no issues there either.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63773#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list