前言介紹
- 這款 WordPress 外掛「Native Lazyload」是 2019-09-04 上架。
- 目前有 7000 個安裝啟用數。
- 上一次更新是 2019-12-06,距離現在已有 1975 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.7 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
- 有 31 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
lazy | load | native | loading | lazyload |
內容簡介
此外掛使用內建的瀏覽器功能來進行延遲加載媒體。如需了解更多關於新 loading 屬性的資訊,請參閱此處,或檢視 WordPress 核心票證中討論將類似的實作加入 WordPress 核心本身的事宜。
如果瀏覽器不支援 loading 屬性,此外掛將會退回到基於 IntersectionObserver 的 JavaScript 解決方案。假如 JavaScript 被禁止,但瀏覽器支援 loading 屬性,將會新增一個 noscript 變體,該元素也包含有 loading 屬性,而無需進行任何進一步的更改。
「原生」意味著「快速」
如果您已經找到了這裡,您可能已經意識到性能對網站的用戶體驗和成功是多麼重要了。您也可能知道,延遲加載是改善性能的關鍵功能。然而,到目前為止,延遲加載的解決方案仍然會增加一定的負擔,因為它們依賴於加載、解析和運行自定義 JavaScript 邏輯,可能對性能更或少造成負荷。
此外掛基本上消除了這種模式。它依賴於新的 loading 屬性,使延遲加載成為瀏覽器內的功能。此屬性已獲得 Chrome 的支援,並將逐步推出到其他瀏覽器中。解決方案是「原生」的,這意味著它不依賴於自定義 JavaScript 邏輯,因此更輕量級。而「更輕量級」就意味著「更快速」。
最後,需要記住的一個漂亮的功能是,隨著越來越多的瀏覽器支援 loading 屬性,此外掛本身將不斷改進。
用法
只需啟用此外掛,所有文章內容中的圖像和 iframe 將會被延遲加載。
感謝
此外掛部分基於來自 WP Rig 的邏輯,以及由 web.dev 和 developers.google.com 提出的建議。
原文外掛簡介
Lazy-loads media using the native browser feature. Learn more about the new loading attribute or view the WordPress core ticket where inclusion of a similar implementation in WordPress core itself is being discussed.
If the loading attribute is not supported by the browser, the plugin falls back to a JavaScript solution based on IntersectionObserver. For the case that JavaScript is disabled, but the loading attribute is supported by the browser, a noscript variant of the respective element will be added that also includes the loading attribute without any further changes.
“Native” means “Fast”
If you have found your way over here, you are probably aware of how crucial performance is for a website’s user experience and success. You might also know that lazy-loading is a key feature to improve said performance. However, the solutions for lazy-loading so far still added a bit of overhead themselves, since they relied on loading, parsing and running custom JavaScript logic, that may be more or less heavy on performance.
This plugin largely does away with this pattern. It relies on the new loading attribute, which makes lazy-loading a native browser functionality. The attribute is already supported by Chrome, and will be rolled out to other browsers over time. The solution being “native” means that it does not rely on custom JavaScript logic, and thus is more lightweight. And “more lightweight” means “faster”.
Last but not least, a neat thing to keep in mind is that this plugin will essentially improve itself over time, as more browsers roll out support for the loading attribute.
Usage
Just activate the plugin, and all your images and iframes in post content will be loaded lazily.
Credit
This plugin is partly based on logic from WP Rig as well as recommendations from web.dev and developers.google.com.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Native Lazyload」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.0 | 1.0.1 | 1.0.2 | trunk |
延伸相關外掛(你可能也想知道)
Disable Lazy Load 》, 這個外掛只有一個功能:關閉 WP 懶加載的功能。, , 啟用此外掛以關閉新的 WP 懶加載功能(添加在 WP 版本 5.5 中)。隨時可以停用此外掛以重新啟用懶加載功...。
Page Loading Effects 》透過我們的新 WP 外掛,為您的網站載入頁面注入生命。外掛提供視覺效果呈現載入動畫,當您的訪客等待頁面完全載入時,可以享受娛樂。讓無法容忍乏味載入畫面...。
Crazy Lazy 》警告:Crazy Lazy 已經到達生命週期的終點。WordPress 5.5+ 支援使用本地 HTML loading 屬性的核心延遲加載圖像,請使用替代外掛 Lazy Loader。, Crazy Lazy ...。
WordPress Ajax Load More and Infinite Scroll 》Custom Post Type Ajax Load More 是 WordPress 的靈活解決方案之一,它只會載入部分帖子,其餘帖子將使用無限滾動或更多載入功能載入,並且您可以快速創建漂...。
Disable Lazy Loading for IFRAMES 》WordPress 5.7釋出後,所有iframe將被預設加上loading="lazy"屬性。請參閱Trac票證50756,以及更改集49808,看看實際在核心中實現的情況。, 短期內,本外掛程...。
WP Lazy Loaded Images 》此外掛是一個簡單的工具,可啟用所有圖片使用 WordPress 圖片功能懶加載,或使用 WordPress Dashboard 嵌入文章和頁面。, 該插件的作用是通過使用 datauri 將...。
Lazy Load Fix for Divi 》**總結:**, - 該外掛提供細緻的控制,手動設置 Divi 頁面上需要進行懶加載的圖片的閾值。, - 包含一個修復 Divi 錯誤的功能,該錯誤導致懶加載閾值的計算不...。
Lazy Moderator 》這是使用 WordPress 審核評論的方法:首先,您會收到 WordPress 發送的新評論電子郵件通知(哇喔!)。你急切地點擊「審核通過」的連結。新的頁籤將打開,要...。
Plugin Name: Lazy Loading images & speed page 》透過新增功能性和樣式腳本,提升您的網站速度。
Be Lazy 》透過延時載入圖片,提高網站使用者體驗及 SEO 排名。, 什麼是延時載入?, 「延時載入是一項技術,它將非關鍵資源的載入推遲到頁面載入時間以後。而這些非關鍵...。
DBlocks Lazyload for YouTube 》總結:這是一個符合 GDPR 規定並具備懶加載功能的 YouTube 播放器外掛,只有在使用者點擊播放視頻時才會加載內容。, , 問題與答案:, 1. 這個 WordPress 外掛...。
SARVAROV Lazy Load 》這款外掛是讓你的圖片、iframe 和影片慢慢載入的最佳方式。只需啟用外掛,延遲載入將自動運作。非常簡單,不妨試試看!, 這款外掛能讓你的網站更快, 所有媒體...。
Lightest Lazy Load 》這是目前為止最輕量的 lazy load(懶加載)外掛程式。。