[wp-trac] [WordPress Trac] #35725: Add WebP support.
WordPress Trac
noreply at wordpress.org
Wed May 5 00:20:59 UTC 2021
#35725: Add WebP support.
-------------------------------------------------+-------------------------
Reporter: markoheijnen | Owner:
| adamsilverstein
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.8
Component: Media | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch needs-testing has-unit- | Focuses:
tests needs-dev-note dev-feedback |
-------------------------------------------------+-------------------------
Comment (by johnjamesjacoby):
Neat! Some initial thoughts:
* Should `webp` be added to the `upload_filetypes` multisite setting?
* Should/can the new functions in `function_exists()` checks be added to
`compat.php` to shim WebP functionality entirely when GD does not support
it?
* It seems weird to hardcode support for `webp` into all of the mime
arrays, knowing the environment may not offer support for it. I understand
fully that this gripe is out-of-scope here, but this initiative reminds me
how frustrating it is as a user to have WordPress let me attempt something
when it knows it will fail 100% of the time.
* Constants in `compat.php` (`IMAGETYPE_WEBP`, `IMG_WEBP`) are weird.
Maybe `default-constants.php`?
* Should `wp_get_webp_info()` be public? Seems WebP specific?
* Should `_wp_get_image_size()` be private? Seems generally useful.
* `wp_getimagesize()` was introduced in WordPress 5.7, which competes with
`_wp_get_image_size()`
* Should `_wp_webp_is_lossy()` be WebP specific? Are other mimes'
lossy'ness similarly detectable?
* Is the `@` in front of the `_wp_get_image_size()` usages necessary?
* `_wp_get_image_size()` has some whitespace inconsistencies
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35725#comment:177>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list