[wp-trac] [WordPress Trac] #59641: manually setting fetchpriority on image should prevent core from adding fetchpriority attribute

WordPress Trac noreply at wordpress.org
Tue Oct 17 13:57:15 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:  6.5
Component:  Media            |     Version:  6.3
 Severity:  normal           |  Resolution:
 Keywords:  needs-patch      |     Focuses:  performance
-----------------------------+--------------------------

Comment (by adamsilverstein):

 > @adamsilverstein How does the plugin add fetchpriority="high"? Is it
 dynamic (via PHP logic), or is it hard-coded in the saved block content in
 the database? Would be great if you could provide additional context on
 that.

 Good question!

 It is saved as a block attribute, then applied to the markup dynamically
 using the `render_block` filter - see https://github.com/adamsilverstein
 /wp-fetchpriority-control/blob/dd0281b319794d7fe44317cb588a6c135f970200
 /wp-fetchpriority-control.php#L34-L54

 Do you think the timing of this filtering is part of the issue?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59641#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list