[wp-trac] [WordPress Trac] #57086: Omit or filter decoding attribute in wp_get_attachment_image()
WordPress Trac
noreply at wordpress.org
Wed Nov 16 22:22:14 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 adamsilverstein):
> Shouldn't we introduce that filter in that function too ?
@maximej **You should be able to use the
`wp_get_attachment_image_attributes` filter that runs later in this
function to remove the attribute*. Adding another filter seems redundant.
Is the `wp_get_attachment_image` function being called in a plugin you use
or your own code?
> (I manage a website where this async decoding attribute causes erratic
issues in which some images of the posts carousels are not loaded until a
browser zoom or some other action).
Can you elaborate on that a bit further? my understanding was the
decoding="async" attribute is safe to use in every context. If not, I'd
like to better understand the underlying issue. What code or plugin do you
use to show post carousels? Do the issues happen in specific browsers or
browser versions? can you share a link to a problematic URL?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57086#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list