[wp-trac] [WordPress Trac] #44427: Introduce lazy-loading API for media and other elements

WordPress Trac noreply at wordpress.org
Fri Dec 27 04:48:55 UTC 2019


#44427: Introduce lazy-loading API for media and other elements
--------------------------------------+--------------------------
 Reporter:  mor10                     |       Owner:  flixos90
     Type:  feature request           |      Status:  assigned
 Priority:  normal                    |   Milestone:  5.4
Component:  Media                     |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------

Comment (by spacedmonkey):

 > If I understand properly, the recent patches have moved from an approach
 of having this be something that a theme supports and opts into, to a
 default inclusion of the attribute set to lazy, for both existing and new
 images. Is this correct?
 That is correct @mikeschroder. It is automatically opts you in.

 Lazy loading images / iframes, is an opt in feature in chrome. There many
 use cases that require an image or iframe to be loaded on page load. A
 good example of which would be a tracking pixel. This image is not loaded,
 then a page view is not tracked. So the browser can not and should not
 force this behavior.

 In the WordPress use case, image tag generated by PHP seems to be
 reasonable to make lazy loading. It is the some reasoning behind srcset,
 to increase loading performance and make user experience better.

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


More information about the wp-trac mailing list