[wp-trac] [WordPress Trac] #53232: Add async decoding attribute as default to the HTML image tags generated by WordPress
WordPress Trac
noreply at wordpress.org
Tue Apr 19 04:28:17 UTC 2022
#53232: Add async decoding attribute as default to the HTML image tags generated by
WordPress
--------------------------------------+------------------------------
Reporter: isaumya | Owner: adamsilverstein
Type: feature request | Status: assigned
Priority: normal | Milestone: 6.1
Component: Media | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: performance
--------------------------------------+------------------------------
Changes (by costdev):
* keywords: has-patch has-unit-tests needs-refresh => has-patch has-unit-
tests
Comment:
[https://core.trac.wordpress.org/attachment/ticket/53232/53232.10.diff
53232.10.diff] refreshes the previous patch with the following updates:
- Fix failing tests.
- Add dedicated tests for `wp_img_tag_add_decoding_attr()`.
- Change `false === strpos()` to `! str_contains()`, which was polyfilled
in WordPress 5.9.
- Fix some documentation alignment issues.
- Adjust the documented type of `$value` for the
`wp_img_tag_add_decoding_attr` filter.
- This was previously `string|bool`, but is documented to be
`string|falsey`. Reasonable falsey values for a callback for this filter
would be `''`, `false` or `null`. The type for `$value` has been adjusted
to `string|false|null`.
- @peterwilsoncc has applied these changes to
[https://github.com/WordPress/wordpress-develop/pull/2409 PR 2409].
@adamsilverstein can you take a look at the above changes and let me know
your thoughts?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53232#comment:62>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list