WordPress plugin intelligence profile

Embed Optimizer

Optimizes the performance of embeds through lazy-loading, adding dns-prefetch links, and reserving space to reduce layout shifts.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 7.1
Current version1.0.0-beta6
WordPress coverageTested up to WordPress 7.1
Minimum stackWP 6.9 · PHP 7.4
Directory statusactive
Last directory update26 Aug 20262mo ago
Active installations50K+Adoption metric — not a quality score
WordPress.org rating3.0 / 5 from 2 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Embed Optimizer version 1.0.0-beta6 as active, updated 2mo ago and tested up to WordPress 7.1.

Overview

About this plugin

This plugin’s purpose is to optimize the performance of embeds in WordPress, such as Tweets, YouTube videos, TikToks, and others.

The current optimizations include:

  • Lazy loading embeds just before they come into view.
  • Adding dns-prefetch links for embeds in the initial viewport.
  • Reserving space for embeds that resize to reduce layout shifting.

Lazy loading embeds improves performance because embeds are generally very resource-intensive, so lazy loading them ensures that they don’t compete with resources when the page is loading. Lazy loading of IFRAME -based embeds is handled simply by adding the loading=lazy attribute. Lazy loading embeds that include SCRIPT tags is handled by using an Intersection Observer to watch for when the embed’s FIGURE container is going to enter the viewport, and then it dynamically inserts the SCRIPT tag.

This plugin also recommends that you install and activate the Optimization Detective plugin, which unlocks several optimizations beyond just lazy loading. Without Optimization Detective, lazy loading can actually degrade performance when an embed is positioned in the initial viewport. This is because lazy loading such viewport-initial elements can degrade LCP since rendering is delayed by the logic to determine whether the element is visible.

This is why WordPress Core tries its best to avoid lazy loading IMG tags which appear in the initial viewport, although the server-side heuristics aren’t perfect. This is where Optimization Detective comes in since it detects whether an embed appears in any breakpoint-specific viewports, like mobile, tablet, and desktop. )

When Optimization Detective is active, it will start keeping track of which embeds appear in the initial viewport based on actual visits to your site. With this information in hand, Embed Optimizer will then avoid lazy loading embeds which appear in the initial viewport. Furthermore, for such above-the-fold embeds Embed Optimizer will also add dns-prefetch links for resources known to be used by those embeds.

com which is the domain from which YouTube video poster images are served. Such links cause the initial-viewport embeds to load even faster.

The other major feature in Embed Optimizer enabled by Optimization Detective is the reduction of layout shifts caused by embeds that resize when they load. This is seen commonly in WordPress post embeds or Tweet embeds. Embed Optimizer keeps track of the resized heights of these embeds.

With these resized heights stored, Embed Optimizer sets the appropriate height on the container FIGURE element as the viewport-specific min-height so that when the embed loads it does not cause a layout shift.

Since Optimization Detective relies on page visits to learn how the page is laid out, you’ll need to wait until you have visits from a mobile and desktop device to start seeing optimizations applied. Also, note that Optimization Detective does not apply optimizations by default for logged-in admin users.

Please note that the optimizations are intended to apply to Embed blocks. So if you do not see optimizations applied, make sure that your embeds are not inside a Classic Block.

Your site must have the REST API accessible to unauthenticated frontend visitors since this is how metrics are collected about how a page should be optimized. There are currently no settings and no user interface for this plugin since it is designed to work without any configuration.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • optimization detective
  • embeds
  • performance
Compatibility & maintenance

Compatibility & maintenance

Tested with WP 7.1

Marked as tested with the current WordPress 7.1 release.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to7.1
Minimum requirementsWordPress 6.9 · PHP 7.4
Update activity26 Aug 20262mo ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.