[wp-trac] [WordPress Trac] #35725: Add WebP support.
WordPress Trac
noreply at wordpress.org
Thu Apr 1 14:21:09 UTC 2021
#35725: Add WebP support.
-------------------------------------------------+-------------------------
Reporter: markoheijnen | Owner:
| adamsilverstein
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.8
Component: Media | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch needs-testing has-unit- | Focuses:
tests needs-dev-note dev-feedback |
-------------------------------------------------+-------------------------
Comment (by adamsilverstein):
> I'm wondering if WordPress should detect when a lossless image is
uploaded, and generate lossless resizes?
Good idea, I agree the expectation when uploading a lossless image is the
subsizes should also be lossless.
Imagick will only use lossless if we set the quality to 100 or above then
call `$img->setOption('webp:lossless', 'true');`, so we need to do that
manually. With LibGD we need to set the quality to `gdWebpLossless`.
For WebP uploads, the patch already includes code that reads a WebP header
and determines the file type, which we could use. For other formats, we
can tell lossy/lossless by the file type.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35725#comment:146>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list