[wp-trac] [WordPress Trac] #57086: Omit or filter decoding attribute in wp_get_attachment_image()
WordPress Trac
noreply at wordpress.org
Wed Nov 16 16:59:07 UTC 2022
#57086: Omit or filter decoding attribute in wp_get_attachment_image()
--------------------------------------+--------------------------
Reporter: maximej | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.2
Component: Media | Version: 6.1
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: performance
--------------------------------------+--------------------------
Comment (by maximej):
Hi @peterwilsoncc, thanks for the consideration !
> The `decoding` attribute can be controlled via the
`wp_img_tag_add_decoding_attr` filter by returning a value of `false`, you
can see further
[https://developer.wordpress.org/reference/hooks/wp_img_tag_add_loading_attr/
documentation for the filter in the developer guide].
Unless I miss something, that filter has no effect on
`wp_get_attachment_image()`
(in my tests and by seeing the code)
The patch submitted handles only the first part of the ticket.
Shouldn't we introduce that filter in that function too ?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57086#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list