前言介紹
- 這款 WordPress 外掛「Embed Optimizer」是 2024-03-19 上架。
- 目前有 30000 個安裝啟用數。
- 上一次更新是 2025-04-09,距離現在已有 25 天。
- 外掛最低要求 WordPress 6.6 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.2 以上。
- 尚未有人給過這款外掛評分。
- 論壇上目前有 1 個提問,問題解答率 100% ,不低,算是個很有心解決問題的開發者團隊了!
外掛協作開發者
外掛標籤
Embeds | performance |
內容簡介
WordPress外掛總結:
- 這個外掛的目的是優化WordPress中的嵌入內容的性能,例如YouTube視頻、TikTok等。
- 最初通過僅在嵌入內容進入視圖時才進行延遲加載來實現此目的。
- 這樣做可以改善性能,因為嵌入內容通常需要大量資源,延遲加載可以確保在頁面載入時不會與資源競爭。
- 未來計劃進行其他優化。
原文外掛簡介
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 preconnect 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 preconnect 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 preconnect link for https://i.ytimg.com which is the domain from which YouTube video poster images are served. Such preconnect 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.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Embed Optimizer」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.1.0 | 0.1.1 | 0.1.2 | 0.2.0 | 0.3.0 | 0.4.0 | 0.4.1 | trunk | 1.0.0-beta1 | 1.0.0-beta2 |
延伸相關外掛(你可能也想知道)
Disable Embeds 》這個外掛的功能:, , 防止他人嵌入您的網站。, 防止您嵌入非白名單網站。, 禁用所有與此功能相關的 JavaScript。, 從新版區塊編輯器中移除 WordPress 嵌入區...。
Responsive Video Embeds 》這個外掛會自動地以響應式的方式調整你的 WordPress 自動嵌入內容,包括影片和其他的 iframe。目前它支援以下提供者:, , YouTube, Vimeo, DailyMotion, Blip...。
Responsive Videos by Angie Makes 》這個外掛的設計與測試是針對Angie Makes WordPress主題的。, 這個外掛可以自動調整在WordPress編輯器中插入的影片大小,程式碼簡潔且僅使用CSS,不使用Javasc...。
MoonClerk WP Shortcode 》關於, 透過在 WordPress 網站中使用短碼,將 MoonClerk 付款表單嵌入頁面和文章,接受循環付款和一次性付款。, 您需要一個 MoonClerk 帳戶才能使用此外掛。, ...。
Disable Video Download 》在 WordPress 的網站中,此插件可以停用嵌入式影片的「另存新檔」選項、避免使用者下載此影片, , 採用 JavaScript 停用右鍵內建選單以及新增「controlsList」...。
RESTposts 》RESTposts 是一個絕佳的免費工具,可用於顯示並嵌入 WordPress 網站的文章。您可以使用內建的 shortcode 產生器工具,創建完美的簡碼,以任何您喜歡的方式顯...。
Pym.js Embeds 》Pym.js Embeds提供短代碼和古騰堡區塊包裝器,使用由NPR Visuals Team開發的Pym.js嵌入可回應的iframe。嵌入式內容的垂直大小會根據其容器的寬度進行調整。, ...。
Embed Piwigo 》Embed Piwigo這個外掛,可讓你在WordPress文章或頁面中,輕鬆嵌入任何來自Piwigo網站的相片,前提是該網站已被列入白名單清單中。, 換句話說,只要將Piwigo網...。
WP Responsive Embeds 》此外掛會自動使嵌入 YouTube、Google Maps、Vimeo 等內容在不同螢幕大小下保持正確的比例,完美適應整個網頁。, 採用ZURB Foundation的「Responsive Embeds」...。
Linkz.ai – Automatic link previews on hover 》Linkz.ai 是一款外掛程式,只需一行程式碼便可以提供聰明的連結預覽,讓訪客留在您的網站和部落格。Linkz.ai 會自動加入連結預覽浮出視窗,訪客可以在不離開...。
EP4 More Embeds 》EP4 More Embeds 為您的網站添加更多的嵌入式內容支持。它利用 WordPress 的 wp_oembed_add_provider來支持 oEmbed 的提供者,而對於其他仍允許在其他網站上...。
Post Embeds – Customize your WordPress post embeds 》Post Embeds 外掛程式簡化了自訂 WordPress 貼文嵌入的操作。只需幾個點擊,就可以讓您的貼文嵌入有與 Twitter 和 Facebook 類似的設計。, 從未如此簡單自訂...。
OnHover Link Preview 》總結:OnHover Link Preview 外掛可以在使用者不離開您的網站的情況下,自動添加連結預覽彈出視窗,讓訪客可以在懸停在連結上時,即可看到連結的預覽。使用者...。
Display Embedded Videos by D.Biota 》您可以在您的網站中嵌入一個或多個 YouTube 和 Vimeo 影片的畫廊。它們可以按日期順序顯示(最新發布的影片),或者每天隨機顯示,這是一個讓您的訪客參與的...。
Scribit.Pro 》總結:使用 Scribit.Pro WordPress 外掛,您可以輕鬆在 WordPress 網站上發布無障礙視頻,而不需進行任何編碼。即可為您的 YouTube 和 Vimeo 視頻添加語音描...。