[wp-meta] [Making WordPress.org] #5062: Add native lazy loading on theme archive images

Making WordPress.org noreply at wordpress.org
Wed Mar 25 01:59:33 UTC 2020


#5062: Add native lazy loading on theme archive images
-----------------------------+---------------------
 Reporter:  jonoaldersonwp   |       Owner:  (none)
     Type:  defect           |      Status:  new
 Priority:  low              |   Milestone:
Component:  Theme Directory  |  Resolution:
 Keywords:  performance      |
-----------------------------+---------------------

Comment (by dufresnesteven):

 I quickly tried to adding `loading="lazy"` as a progressive enhancement
 but it didn't work. I'm not super familiar with how it works under the
 hood, my guess is that our use of JS to inject the images triggers the
 immediate download.

 If we are concerned about performance, we can look at reducing the
 `postsPerPage`. It's currently set to `24`, which amounts to about
 ~`500kb` of images on page load. Larger viewports see 9 images at most. So
 we could set it to `12` ( 3-6 extra images downloaded on tablet+
 viewports).

 That property is provided to the page in the `_wpThemeSettings`
 configuration object.

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/5062#comment:1>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list