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

WordPress Trac noreply at wordpress.org
Tue Jan 7 13:14:38 UTC 2020


#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 2nd-        |     Focuses:
  opinion                                        |  performance
-------------------------------------------------+-------------------------

Comment (by spacedmonkey):

 I think that discussing `importance` and `decoding` is getting us a little
 off track here. If those attr are going to be added, it should be after
 this and use the existing regex for performance reasons.

 IMO, I believe that browser will never automatically lazy load images. You
 never know when a image HAS to load. For example, tracking pixels or an
 important logo. The way that this feature implemented, so that developers
 have to opt in, so there is no breakage. Adding this attribute feels
 pretty safe here.


 > Would it make sense to make it conditional on having width and height
 and not having importance and decoding

 Lazy loading should be added to all image, as `height` and `width`
 attributes are many times an incorrect and not representative of the size
 of the image.

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


More information about the wp-trac mailing list