Embed Optimizer
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. (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.
Top keywords
- embeds18×3.01%
- loading14×2.34%
- lazy13×2.17%
- embed12×2.00%
- lazy loading11×1.84%
- detective9×1.50%
- optimization9×1.50%
- optimization detective9×1.50%
- viewport8×1.34%
- initial7×1.17%
- initial viewport7×1.17%
- embed optimizer6×1.00%
LiteSpeed Cache
LiteSpeed Cache for WordPress (LSCWP) is an all-in-one site acceleration plugin, featuring an exclusive server-level cache and a collection of optimization features. LSCWP supports WordPress Multisite and is compatible with most popular plugins, including WooCommerce, bbPress, and Yoast SEO. LiteSpeed Cache for WordPress is compatible with ClassicPress. Requirements General Features may be used by anyone with any web server (LiteSpeed, Apache, NGINX, etc.). LiteSpeed Exclusive Features require one of the following: OpenLiteSpeed, commercial LiteSpeed products, LiteSpeed-powered hosting, or QUIC.cloud CDN. Why? Plugin Features General Features Free QUIC.cloud CDN Cache Object Cache (Memcached/LSMCD/Redis) Support+ Image Optimization (Lossless/Lossy) Minify CSS, JavaScript, and HTML Minify inline & external CSS/JS Combine CSS/JS Automatically generate Critical CSS Lazy-load images/iframes Responsive Image Placeholders Multiple CDN Support+ Load CSS Asynchronously Defer/delay JS loading Browser Cache Support+ Database Cleaner and Optimizer PageSpeed score (including Core Web Vitals) optimization OPcode Cache Support+ HTTP/2 Push for CSS/JS (on web servers that support it) DNS Prefetch Cloudflare API Single Site and Multisite (Network) support Import/Export settings Attractive, easy-to-understand interface AVIF/WebP image format support Heartbeat control + This service is not provided by the LSCache plugin, nor is it guaranteed to be installed by your service provider. However, the plugin is compatible with the service if it is in use on your site. LiteSpeed Exclusive Features Automatic page caching to greatly improve site performance Automatic purge of related pages based on certain events Private cache for logged-in users Caching of WordPress REST API calls Separate caching of desktop and mobile views Ability to schedule purge for specified URLs WooCommerce and bbPress support WordPress CLI commands API system for easy cache integration Exclude from cache by URI, Category, Tag, Cookie, User Agent Smart preload crawler with support for SEO-friendly sitemap Multiple crawlers for cache varies HTTP/2 support HTTP/3 & QUIC support ESI (Edge Side Includes) support* Widgets and Shortcodes as ESI blocks* (requires Classic Widgets plugin for WP 5.8+) * Feature not available in OpenLiteSpeed LSCWP Resources Join our Slack community to connect with other LiteSpeed users. Ask a question on our support forum. View detailed documentation. Read about LSCWP and WordPress on our blog. Help translate LSCWP. Contribute to the LSCWP GitHub repo. Third Party Compatibility The vast majority of plugins and themes are compatible with LSCache. Our API is available for those that are not. Use the API to customize smart purging, customize cache rules, create cache varies, and make WP nonce cacheable, among other things. Privacy This plugin includes some suggested text that you can add to your site’s Privacy Policy via the Guide in the WordPress Privacy settings. For your own information: LiteSpeed Cache for WordPress potentially stores a duplicate copy of every web page on display on your site. The pages are stored locally on the system where LiteSpeed server software is installed and are not transferred to or accessed by LiteSpeed employees in any way, except as necessary in providing routine technical support if you request it. All cache files are temporary, and may easily be purged before their natural expiration, if necessary, via a Purge All command. It is up to individual site administrators to come up with their own cache expiration rules. In addition to caching, our WordPress plugin has online features provided by QUIC.cloud for Image Optimization and Page Optimization services. When one of these optimizations is requested, data is transmitted to a remote QUIC.cloud server, processed, and then transmitted back for use on your site. QUIC.cloud keeps copies of that data for up to 7 days and then permanently deletes it. Similarly, the WordPress plugin has a Reporting feature whereby a site owner can transmit an environment report to LiteSpeed so that we may better provide technical support. None of these features collects any visitor data. Only server and site data are involved. QUIC.cloud CDN, if enabled, uses LSCache technology to access your site, and serve your content from remote global nodes. Your data is not accessed by QUIC.cloud employees in any way, except as necessary in providing maintenance or technical support. Please see the QUIC.cloud Privacy Policy for our complete Privacy/GDPR statement.