
內容簡介
影片是可以載入在網頁上的最大資產之一,因此也是慢速執行和高碳排放的最大貢獻者之一。
事實上,加入一個使用最新 WordPress 預設主題的 Youtube 嵌入式影片到網頁時,將頁面傳輸大小從21 kb增加到973 kb,並載入27個其他資源。這是傳輸大小增加了4533%。 如果加入 Vimeo 影片,將傳輸量從21 kb增加到276 kb,增加了1214%的傳輸大小,並載入了7個其他資源。
懶人嵌入式外掛程式會延遲載入播放影片所需之任何資源,直到有要求播放影片時才載入。它通過添加 srcdoc 屬性到 iframe 中,在正常 iframe 內容的位置顯示。
目前支持以下第三方:
Youtube
Vimeo
Dailymotion
外掛標籤
開發者團隊
原文外掛簡介
Videos are one of the largest assets that can be loaded on a webpage, and as such are one of the largest contributors to slow performance and high carbon emissions.
In fact, adding a Youtube embed to a page using the latest default WordPress theme, increased the page transfer size from 21 kb to 973 kb, and loaded an additional 27 resources. That’s an increase in transfer size of 4533%. Adding a Vimeo video increased the transfer from 21 kb to 276 kb, an increase in transfer size of 1214%, and loaded an additional 7 resources.
The Lazy Embed plugin defers the loading of any resource required for playing the video until the video is requested to be played. It does this by adding a srcdoc attribute to the iframe which shows in place of the normal iframe content.
Currently the following third parties are supported
Youtube
Vimeo
Dailymotion
