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

WordPress Trac noreply at wordpress.org
Sun Nov 3 19:08:08 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:  needs-unit-tests has-patch  |     Focuses:  performance
----------------------------------------+--------------------------

Comment (by westonruter):

 In addition to:

 {{{#!php
 <?php
 add_filter( 'the_content', 'wp_lazy_load_content_media' );
 }}}

 What about also adding it to `widget_text_content`, `the_excerpt`,
 `the_post_thumbnail_caption`, `comment_text` among some others perhaps?

 Also, I believe `wp_lazy_load_content_media` should be run after
 `convert_smilies` which runs at priority 20 (at least for `the_content`).

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


More information about the wp-trac mailing list