[wp-trac] [WordPress Trac] #58635: Images before main query loop are not counted towards lazy-loading threshold

WordPress Trac noreply at wordpress.org
Wed Jul 5 21:36:39 UTC 2023


#58635: Images before main query loop are not counted towards lazy-loading
threshold
---------------------------------------------+--------------------------
 Reporter:  flixos90                         |       Owner:  flixos90
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  6.3
Component:  Media                            |     Version:  trunk
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:  performance
---------------------------------------------+--------------------------
Changes (by flixos90):

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


Comment:

 In [changeset:"56143" 56143]:
 {{{
 #!CommitTicketReference repository="" revision="56143"
 Media: Ensure that large images before the main query loop are counted
 towards lazy-loading threshold.

 Following [55318], [55847], and [56142], certain images in the header of
 the page have received support for potentially receiving
 `fetchpriority="high"` and having the `loading="lazy"` attribute omitted.
 However, these images being present did not affect the "content media
 count" which counts the images towards a certain threshold so that the
 first ones are not lazy-loaded.

 This changeset also increases that count for such header images if they
 are larger than a certain threshold. The threshold is used to avoid e.g. a
 header with lots of small images such as icon graphics to skew the lazy-
 loading behavior.

 Props thekt12, spacedmonkey, flixos90.
 Fixes #58635.
 }}}

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


More information about the wp-trac mailing list