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

WordPress Trac noreply at wordpress.org
Wed Apr 8 00:53:32 UTC 2020


#44427: Introduce lazy-loading API for media and other elements
-------------------------------------------------+-------------------------
 Reporter:  mor10                                |       Owner:  flixos90
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  5.5
Component:  Media                                |     Version:  5.4
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests 2nd-        |     Focuses:
  opinion early needs-testing                    |  performance
-------------------------------------------------+-------------------------
Changes (by azaozz):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"47554" 47554]:
 {{{
 #!CommitTicketReference repository="" revision="47554"
 Media: Enable lazy-loading of images by automatically adding the new
 `loading="lazy"` attribute to image tags on the front-end.
 - Introduces `wp_lazy_loading_enabled()`, `wp_filter_content_tags()`,
 `wp_img_tag_add_loading_attr()`, and
 `wp_img_tag_add_srcset_and_sizes_attr()` functions.
 - Introduces `wp_lazy_loading_enabled`, `wp_img_tag_add_loading_attr`, and
 `wp_img_tag_add_srcset_and_sizes_attr` filters.

 Props flixos90, addyosmani, mor10, swissspidy, pierlo, westonruter,
 spacedmonkey, mikeschroder, jonoaldersonwp, peterwilsoncc, narwen,
 jeffpaul, OptimizingMatters, futtta, mukeshpanchal27, azaozz.

 Fixes #44427.
 }}}

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


More information about the wp-trac mailing list