WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by WordPress Performance Team v1.0.0-beta6

Embed Optimizer

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

Embed Optimizer

The facts

Rating
3★ from 2
Active installs
50k+
Price
Free
Last updated
26 Aug 2026
Added
Mar 2024
Requires WP
6.9
Tested up to
WP 7.1
Requires PHP
7.4
Downloads
404,694

Our analysis

AI-assisted

Embed Optimizer is a WordPress plugin designed to enhance the performance of various embeds such as Tweets and YouTube videos. It achieves this by implementing lazy loading, adding dns-prefetch links, and reserving space for embeds to reduce layout shifts. The plugin works best in conjunction with the Optimization Detective plugin, which helps to determine the visibility of embeds in different viewports.

This plugin is suitable for WordPress users who frequently use embeds and want to improve page loading times and overall site performance. It is particularly beneficial for those who have a mix of mobile and desktop visitors, as it learns from actual site visits to optimize embed loading effectively.

Best for: WordPress users who want to optimize the loading of embeds on their site.

What it does well

  • Optimizes performance of embeds in WordPress
  • Implements lazy loading for resource-intensive embeds
  • Reduces layout shifts caused by resizing embeds
  • Works in conjunction with Optimization Detective for enhanced features
  • Free to use from the WordPress.org directory

Where it falls short

  • Requires the Optimization Detective plugin for full functionality
  • Optimizations depend on actual site visits to learn layout
  • Does not apply optimizations for logged-in admin users

Verdict

Embed Optimizer provides useful features for improving the performance of embeds, but its effectiveness relies on the additional Optimization Detective plugin and actual site traffic.

From the developer

WordPress Performance Team's own description of Embed Optimizer, lightly tidied.

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:

  1. Lazy loading embeds just before they come into view.
  2. Adding dns-prefetch links for embeds in the initial viewport.
  3. 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. (See also the Image Prioritizer plugin which extends Optimization Detective to ensure lazy loading is correctly applied based on whether an IMG is in the initial viewport.)

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. For example, if a YouTube embed appears in the initial viewport, Embed Optimizer with Optimization Detective will omit loading=lazy while also adding a dns-prefetch link for https://i.ytimg.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.

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for making sites fast.

WP-Optimize

Get caching and more with this powerful cache plugin. Cache, optimize images, clean your database and minify f...

Free 1M+ installs 4.8★ (2,606)
LiteSpeed Cache

All-in-one unbeatable acceleration & PageSpeed improvement: caching, image/CSS/JS optimization...

Free 7M+ installs 4.8★ (2,764)
EWWW Image Optimizer

Comprehensive image optimization with WebP, AVIF, Lazy Load, and more. Optimize images automatically for Faste...

Free 1M+ installs 4.8★ (1,838)
Under Construction

Easy to use Under Construction Page & Coming Soon Page. Enable Under Construction Mode in seconds & sh...

Free 600k+ installs 4.8★ (1,285)
Smush

Smush

93

Compress and optimize images, enable lazy load, serve WebP & AVIF, and speed up your site with a global im...

Free 1M+ installs 4.8★ (6,051)
Converter for Media

Speed up your website by using our WebP & AVIF Converter. Optimize images and serve WebP and AVIF images i...

Free 500k+ installs 4.9★ (1,097)