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

WordPress Trac noreply at wordpress.org
Wed Mar 24 01:51:06 UTC 2021


#52768: WordPress post URL oEmbed rendering blocked by iframe lazy-loading
---------------------------+--------------------------
 Reporter:  SirStuey       |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  5.7.1
Component:  Embeds         |     Version:  5.7
 Severity:  normal         |  Resolution:
 Keywords:  needs-testing  |     Focuses:  performance
---------------------------+--------------------------

Comment (by peterwilsoncc):

 Replying to [comment:7 flixos90]:
 > @SirStuey @peterwilsoncc I debugged this for a while, but haven't been
 able to come to a proper conclusion on why exactly this is happening. Here
 are some of my observations:
 >
 > * When I visit https://make.wordpress.org/core/2021/02/23/wordpress-5-7
 -field-guide/ on Chrome and Mac OS (Catalina), I see the embeds working as
 expected. So the particular URL used as example here works for me, so even
 this seems to be more specific than a certain browser on a certain OS.

 @flixos90 I'm seeing it when using the latest versions of Chrome & Chrome
 Canary (no extensions in either) on macOS Big Sur (11.2.1).

 > ...
 >
 >
 > Potentially to fix this in 5.7.1 we should simply not add the `loading`
 attribute to WordPress embed iframes. We could do that by simply returning
 early in `wp_iframe_tag_add_loading_attr()` if the current iframe is for a
 WordPress embed (e.g. check existence of `wp-embedded-content` class). We
 could then further investigate this problem and potentially fix it
 ''really'' in a follow-up issue.
 >
 > What do you think?

 I'm waiting to hear back from the reporter but #52856 suggests it is
 affecting Amazon embeds too so I am a little concerned it's a wider issue.
 I'm undecided as to whether this a browser or WP implementation bug but,
 either way, given Chrome's market dominance probably something WordPress
 ought to fix/work-around.

 I'm a little worried such a targeted fix would miss other affected embeds,
 either WP native or added via raw HTML by a user with the
 `unfiltered_html` capability.

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


More information about the wp-trac mailing list