[WordPress] 外掛分享: Native Lazyload + Polyfill

首頁外掛目錄 › Native Lazyload + Polyfill
WordPress 外掛 Native Lazyload + Polyfill 的封面圖片
20+
安裝啟用
尚無評分
2351 天前
最後更新
問題解決
WordPress 4.4.0+ PHP 7.0+ v1.1.0 上架:2019-08-25

內容簡介

這個外掛是一個極簡型的圖片延遲載入工具,會在圖片出現在畫面時載入。會將原生的圖片延遲載入功能加到所有的圖片和嵌入內容(Chrome)上,並且加入 polyfill(1.07 KiB 壓縮),使其在所有瀏覽器上運作。

首頁
Gitlab

技術上的運作方式(如果你有興趣)

在 the_content 和其他區域中,將所有的 <img> 和 <iframe> 加上 loading="lazy" 屬性。
同時,也將 <img>、<iframe> 和 <pictures> 的內容用 <noscript> 包裹起來。
加入 loading-attribute-polyfill 以透過 JavaScript 達到其效果。

歡迎提供回饋和協助。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Native Lazyload + Polyfill」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Minimalistic lazyloading, loads images as they come into view. Adds native lazyloading to all images and embeds (Chrome) and adds a polyfill (1.07 KiB gzipped) to make it work in all browsers.

Homepage
Gitlab

How it works technically (if you care)

Adds loading="lazy" to all and