[wp-trac] [WordPress Trac] #52768: WordPress post URL oEmbed rendering blocked by iframe lazy-loading

WordPress Trac noreply at wordpress.org
Wed Apr 7 01:51:14 UTC 2021

#52768: WordPress post URL oEmbed rendering blocked by iframe lazy-loading
 Reporter:  SirStuey                             |       Owner:
                                                 |  peterwilsoncc
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  5.7.1
Component:  Embeds                               |     Version:  5.7
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  needs-testing has-patch has-unit-    |     Focuses:
  tests fixed-major                              |  performance
Changes (by peterwilsoncc):

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


 In [changeset:"50684" 50684]:
 #!CommitTicketReference repository="" revision="50684"
 Media: Do not lazy load hidden images or embeds.

 Improve the check for sourceless or dimensionless media when determining
 if the lazy loading attribute should be added to iframes and images. Never
 include the lazy loading attribute on embeds of WordPress posts as the
 iframe is initially hidden.

 Including `loading="lazy"` on initially hidden iframes and images can
 prevent the media from loading in some browsers.

 Props adamsilverstein, fabianpimminger, flixos90, johnbillion,
 jonkastonka, joyously, peterwilsoncc, SergeyBiryukov, SirStuey,
 Merges [50682], [50683] to the 5.7 branch.
 Fixes #52768.

Ticket URL: <https://core.trac.wordpress.org/ticket/52768#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list