[wp-trac] [WordPress Trac] #60291: Support Lossless WebP in WP_Image_Editor_GD
WordPress Trac
noreply at wordpress.org
Fri Jan 19 01:08:14 UTC 2024
#60291: Support Lossless WebP in WP_Image_Editor_GD
-----------------------------+-----------------------------
Reporter: adamsilverstein | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 5.8
Severity: normal | Keywords: needs-patch
Focuses: |
-----------------------------+-----------------------------
While WordPress has supported WebP lossless since WebP support was
introduced in WP 5.8
(https://make.wordpress.org/core/2021/06/07/wordpress-5-8-adds-webp-
support/) - outputting lossless sub-size image when you upload a lossless
WebP - this only worked correctly when Imagick was installed as at the
time lossless was not supported in PHP's bundled GD.
PHP's bundled GD supports lossless output for WebP images since PHP 8.1,
see see php.watch/versions/8.1/gd-webp-lossless.
The capability to handle lossless WebPs can be detected in GD by the
presence of the `IMG_WEBP_LOSSLESS` constant.
To fix this - similar to Imagick, GD should output WebP lossless images
when lossless WebP images are uploaded.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60291>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list