[buddypress-trac] [BuddyPress Trac] #8340: Support native browser image lazy-loading

buddypress-trac noreply at wordpress.org
Wed Sep 23 22:24:35 UTC 2020


#8340: Support native browser image lazy-loading
-------------------------+-----------------------
 Reporter:  r-a-y        |       Owner:  r-a-y
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  7.0.0
Component:  Core         |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+-----------------------

Comment (by r-a-y):

 I've introduced a new generic function,
 `bp_core_add_loading_lazy_attribute()`, so we can inject the
 `loading="lazy"` attribute into the various available filters we have. I
 should note that it doesn't check for the existence of an existing
 `loading="lazy"` attribute. If we want to do some checks before adding the
 attribute, let me know and I'll do it, but I think we should be good.

 In places where there are no filters, I've manually added the
 `loading="lazy"` attribute.

 I've also chosen to do this for places where we add `<iframe>` content.
 This is mostly for oEmbed content. Only Chrome supports `<iframe
 loading="lazy">` at the moment, but Firefox will probably add support
 later on.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8340#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list