[wp-trac] [WordPress Trac] #59641: manually setting fetchpriority on image should prevent core from adding fetchpriority attribute
WordPress Trac
noreply at wordpress.org
Mon Oct 16 20:44:56 UTC 2023
#59641: manually setting fetchpriority on image should prevent core from adding
fetchpriority attribute
-----------------------------+-----------------------------
Reporter: adamsilverstein | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 6.3
Severity: normal | Keywords: needs-patch
Focuses: performance |
-----------------------------+-----------------------------
When working on testing the automated fetchpriorty attribute core now adds
for images, I discovered this bug:
If users manually set fetchpriority="high" on an image either
programmatically or using a plugin, core will not change that setting,
however it unexpectedly sets fetchpriority="high" on another image.
=== Steps to reproduce
1. install this plugin to add a manual fetchpriority dropdown:
https://github.com/adamsilverstein/wp-fetchpriority-control
2. create a post with several large images
3. select the first image and apply fetchpriority="high" (under advanced)
3. publish the post and view its source
**Expected results:**
Only the first image should have the `fetchpriority="high"` attribute,
setting high fetchpriority on more than one image reduces the effect of
adding the attribute.
**Actual result:**
Core applies `fetchpriority="high"` to the second image so the first two
images contain the attribute.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59641>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list