[wp-trac] [WordPress Trac] #58235: Enhance hero image loading performance with Fetchpriority

WordPress Trac noreply at wordpress.org
Fri Jul 7 18:07:06 UTC 2023


#58235: Enhance hero image loading performance with Fetchpriority
---------------------------------------------+--------------------------
 Reporter:  flixos90                         |       Owner:  flixos90
     Type:  enhancement                      |      Status:  closed
 Priority:  high                             |   Milestone:  6.3
Component:  Media                            |     Version:
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch needs-dev-note commit  |     Focuses:  performance
---------------------------------------------+--------------------------
Changes (by flixos90):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"56164" 56164]:
 {{{
 #!CommitTicketReference repository="" revision="56164"
 Media: Avoid programmatically created images within post content from
 incorrectly receiving `fetchpriority="high"`.

 Follow-up to [56037], as that changeset accidentally did not consider the
 changes made in [55825]: Images that are programmatically injected into
 post content (e.g. through a block, or shortcode, or any hook calling a
 function like `wp_get_attachment_image()`) must be treated as part of the
 whole post content blob since otherwise the heuristics for applying
 `fetchpriority="high"` and `loading="lazy"` are skewed by parsing certain
 images before others rather than sequentially parsing the entire post
 content. [55825] addressed that for lazy-loading, but when [56037]
 introduced `fetchpriority` support, the related refactor missed making the
 same consideration for that attribute.

 Props flixos90, spacedmonkey, thekt12, mukesh27.
 Fixes #58235.
 See #58089.
 }}}

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


More information about the wp-trac mailing list