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

WordPress Trac noreply at wordpress.org
Fri Dec 6 15:44:31 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 flixos90):

 @westonruter

 Thanks for putting this PR together from the patches.

 @spacedmonkey
 > Another filter we may want to think about implement lazying loading in
 is the header image that uses `get_header_image_tag`. In 99% of case, this
 image will be loaded first on the page, making adding the filter a little
 pointless. But maybe worth it for the sack of completeness.

 I think we can omit that one for the reason you outlined.

 I also left a review on https://github.com/WordPress/wordpress-
 develop/pull/123#pullrequestreview-328275558. I think introducing general
 filters here is out of scope, it doesn't directly relate to lazy-loading,
 especially since what the filters are used for could be easily
 accomplished without them (see [attachment:"44427.5.diff"]).

 I much prefer [attachment:"44427.5.diff"] over [attachment:"44427.6.diff"]
 because it's simpler and more focused on the issue. I think we should
 simply add the filter for `widget_text_content` to
 [attachment:"44427.5.diff"], then it should be good.

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


More information about the wp-trac mailing list