[wp-trac] [WordPress Trac] #35725: Add WebP support.
WordPress Trac
noreply at wordpress.org
Tue Mar 16 14:17:27 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 |
-------------------------------------------------+-------------------------
Changes (by adamsilverstein):
* keywords: has-patch 2nd-opinion needs-testing has-unit-tests => has-
patch needs-testing has-unit-tests needs-dev-note
Comment:
In [attachment:"35725.9.diff"]:
* Create a mime type mapping object that maps image formats, so far jpegs
are mapped to webp, meaning when you upload a jpeg image, the downsampled
copies will be created as webp.
* Introduce a new filter `image_editor_mime_mapping` which controls image
format mapping; returning false will prevent remapping.
In my testing, my resampled images where ~25% smaller than the jpeg
versions. Other than the smaller file size, everything worked as expected.
I am able to crop images, edit them in the media library and when I delete
a jpeg image in the media library , the associated webp versions are also
removed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35725#comment:89>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list