[wp-trac] [WordPress Trac] #58213: Increase default for `wp_omit_loading_attr_threshold` to 3

WordPress Trac noreply at wordpress.org
Tue May 16 18:50:26 UTC 2023


#58213: Increase default for `wp_omit_loading_attr_threshold` to 3
---------------------------------------------+--------------------------
 Reporter:  flixos90                         |       Owner:  flixos90
     Type:  enhancement                      |      Status:  closed
 Priority:  high                             |   Milestone:  6.3
Component:  Media                            |     Version:
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:  performance
---------------------------------------------+--------------------------
Changes (by flixos90):

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


Comment:

 In [changeset:"55816" 55816]:
 {{{
 #!CommitTicketReference repository="" revision="55816"
 Media: Increase default for `wp_omit_loading_attr_threshold` to 3.

 The previous default threshold for how many content images to skip lazy-
 loading on (which was just 1) has proven to be too strict: HTTP Archive
 data shows that >70% of sites have up to 3 equal-sized images in the
 initial viewport, each of which could be the LCP image and therefore
 should not be lazy-loaded. Lazy-loading too many images has adverse
 effects on load time performance, while increasing the default threshold
 will not negatively affect load time performance even for sites where a
 threshold of 1 would be the perfect choice.

 The change of default value in this changeset will improve performance for
 more WordPress sites out of the box. The `wp_omit_loading_attr_threshold`
 filter can still be used to customize and fine tune the value where
 needed.

 Props thekt12, spacedmonkey, westonruter, flixos90.
 Fixes #58213.
 }}}

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


More information about the wp-trac mailing list