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

WordPress Trac noreply at wordpress.org
Sun Nov 3 22:43:09 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 westonruter):

 Replying to [comment:45 flixos90]:
 > > Also, I believe `wp_lazy_load_content_media` should be run after
 `convert_smilies` which runs at priority 20 (at least for `the_content`).
 >
 > Can you clarify how these two filter functions are related? The existing
 function `wp_make_content_images_responsive()` which also makes media
 element replacements also runs at the default priority 10.

 If `convert_smilies()` causes `img` smiles to be output, then
 `wp_lazy_load_content_media()` should run after it so that they also get
 `loading=lazy`. Either this, or the `translate_smiley()` function could
 itself include `loading=lazy` when constructing the `img`.

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


More information about the wp-trac mailing list