# Understanding embeds in WordPress

**URL:** <https://discuss.httparchive.org/t/understanding-embeds-in-wordpress/2547>\
**Category:** Analysis\
**Created:** [March 21, 2023, 10:31pm UTC](https://discuss.httparchive.org/t/understanding-embeds-in-wordpress/2547 "2023-03-21T22:31:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamsilverstein](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/adamsilverstein/32/1871_2.png) [@adamsilverstein](https://discuss.httparchive.org/u/adamsilverstein)\
**Post date:** [March 21, 2023, 10:31pm UTC](https://discuss.httparchive.org/t/understanding-embeds-in-wordpress/2547/1 "2023-03-21T22:31:46Z")

</div>

I am researching lazy loading of embeds on WordPress sites. In particular, I want to look into the “Embed block” WordPress places into a post when a user pastes in a URL from a supported oEmbed provider. Currently supported oEmbeds in the block editor are listed [here](https://wordpress.org/documentation/article/embeds/).

My local testing indicates that iframes are not consistently lazy-loaded on WordPress sites, even though WordPress already auto-applies the loading=lazy attribute to iframes in the content. As a result, all of the assets required for these embeds are loaded when the page is loaded, even when they aren’t in the viewport.

I’m still digging into if/how we can improve these embeds, which might be at the source - the oEmbed providers themselves. In the meantime, I’d like to understand the size of the problem by examining the embeds found on WordPress sites.

Some questions:

- How many WordPress sites use an embed block (detection [added](https://github.com/HTTPArchive/custom-metrics/pull/73))? Leaving off non-block embeds which will be harder to detect.
- How many embeds are used, broken down by provider (detection [proposed](https://github.com/HTTPArchive/custom-metrics/pull/75))?
- How many of these oEmbeds are the LCP element?
- How many of these embeds have an iframe that uses loading=”lazy”?

Appreciate any tips on answering the last two questions!
