[WordPress] 外掛分享: Lazy Loader

WordPress 外掛 Lazy Loader 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Lazy Loader」是 2015-11-30 上架。
  • 目前有 10000 個安裝啟用數。
  • 上一次更新是 2024-04-14,距離現在已有 385 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.9.8 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
  • 有 49 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

florianbrinkmann |

外掛標籤

images | lazysizes | performance | Lazy Loading |

內容簡介

這款懶加載外掛支援圖片、iFrame、影片和音訊元素,使用輕量級的 lazysizes 腳本。手動修改標記也可以實現懶加載背景圖片、腳本和樣式。

以下元素會自動懶加載(不需要任何手動修改):

在文章、頁面、自訂文章類型、文字小工具等中使用 img 或 picture 插入的圖片
文章縮略圖
內聯背景圖片
所有其他在標記中啟用(未排除或已有懶加載屬性)的圖片和其他媒體,透過處理完整的標記選項。
iFrame*。
影片元素*。
音訊元素*。

* 可以在外掛選項中啟用。

該插件提供以下選項(在「設置」›「媒體」›「懶加載選項」下):

不要懶加載具有特定 CSS 類別的元素(默認可以使用 class 為 skip-lazy 的類別)。
添加應由 Lazy Loader 處理的篩選器。
啟用 iFrame 的懶加載。
包括 lazysizes 原生加載插件,這可以修改圖片和 iFrame 以使用已經支援的瀏覽器原生的懶加載功能。
包括 lazysizes unveilhooks 插件,添加了對更多元素的支援,例如,影片和音訊元素*。
啟用影片元素的海報框懶加載。
啟用音訊元素的懶加載。
啟用內聯背景圖片的懶加載。
顯示加載旋轉圖示。
在特定的文章/頁面禁用插件(這會在所有公開文章類型的編輯檢視中顯示一個核取方塊(除了附件),以禁用整個文章的懶加載)。
處理網站的完整標記。
一個文本區域可以修改預設的 lazysizes 配置值。

* lazysizes 的 unveilhooks 擴展支援不只影片和音訊元素,但需要手動修改標記來使用以下元素:

未使用內聯樣式插入的背景圖片
腳本。
樣式。

該插件為禁用 JavaScript 的使用者提供了 noscript 元素回退。

您可以通過在外掛設置(「設置」›「媒體」›「懶加載選項」)中定義特定 CSS 類別來禁用特定 CSS 類別的元素的懶加載。或使用 skip-lazy 類別或 data-skip-lazy 屬性。skip-lazy 和 data-skip-lazy 也可以在包含元素上運作,以排除包含元素及其子元素的處理。

原文外掛簡介

Lazy loading plugin that supports images, iFrames, video and audio elements and uses the lightweight lazysizes script. With manual modification of the markup it is also possible to lazy load background images, scripts, and styles.
Lazy loads (without the need of any manually modifications):

Images inserted via img or picture in posts, pages, Custom Post Types, Text Widgets, …
Post thumbnails.
Inline background images.
Or all images and other enabled media in the markup (that is not excluded or already has a lazy loading attribute), via the option to process the complete markup.
iFrames.*
Video elements.*
Audio elements.*

* Can be enabled in the plugin options.
The plugin comes with the following options (under Settings › Media › Lazy Loader options):

Do not lazy load elements with specific CSS classes (you can use the class skip-lazy by default).
Add filters that should be processed by Lazy Loader.
Enable lazy loading for iFrames.
Include the lazysizes native loading plugin that modifies images and iFrames to use the native lazy loading feature of browsers that already support it.
Include the lazysizes unveilhooks plugin that adds support for more elements, for example, video and audio elements.*
Enable lazy loading for the poster frame of video elements.
Enable lazy loading for audio elements.
Enable lazy loading for inline background images.
Display a loading spinner.
Disable the plugin on specific posts/pages (this shows a checkbox in the edit view of all public post types (except attachments) to disable lazy loading for an entire post).
Process the complete markup of the site.
A textarea to modify the default lazysizes config values.

* The unveilhooks extension of lazysizes supports more than video and audio elements, but you need to manually modify the markup to use it for:

Background images not inserted with inline styles.
Scripts.
Styles.

The plugin adds a noscript element as fallback for disabled JavaScript (can be disabled with the lazy_loader_generate_noscript filter).
You can disable lazy loading for elements with specific CSS classes by defining them via the plugin settings (Settings › Media › Lazy Loader options). Or use the skip-lazy class or the data-skip-lazy attribute. skip-lazy and data-skip-lazy also work on wrapper elements to exclude the wrapper and its children from being processed.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Lazy Loader」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0 | 3.0 | 1.0.1 | 1.0.2 | 1.0.3 | 1.0.4 | 1.0.5 | 1.0.6 | 1.0.7 | 1.0.8 | 1.0.9 | 3.1.0 | 3.1.1 | 3.1.2 | 3.1.3 | 3.1.4 | 3.1.5 | 3.1.6 | 3.1.7 | 3.1.8 | 3.1.9 | 3.2.0 | 3.2.1 | 3.2.2 | 3.2.3 | 3.2.4 | 3.2.5 | 3.2.6 | 3.2.7 | 3.2.8 | 3.2.9 | 3.3.0 | 3.3.1 | 3.3.2 | 3.3.3 | 3.3.4 | 3.3.5 | 3.3.6 | 3.3.7 | 3.4.0 | 3.5.0 | 3.5.1 | 4.0.0 | 4.0.1 | 4.1.0 | 5.0.0 | 5.1.0 | 5.1.1 | 5.1.2 | 6.0.0 | 6.0.1 | 7.0.0 | 7.1.0 | 7.2.0 | 7.2.1 | 7.2.2 | 7.2.3 | 8.0.0 | 8.1.0 | 8.1.1 | 8.2.0 | trunk | 3.1.10 | 3.1.11 | 3.1.12 | 3.1.13 | 3.2.10 |

延伸相關外掛(你可能也想知道)

  • LiteSpeed Cache 》LiteSpeed Cache for WordPress(LSCWP)是一種全方位的網站加速外掛,包括獨家的伺服器層快取和一系列的優化功能。, LSCWP 支援 WordPress Multisite 及大多...。
  • Jetpack – WP Security, Backup, Speed, & Growth 》search engines, and grow your traffic with Jetpack. It’s the ultimate toolkit for WordPress professionals and beginners alike., , Customize and des...。
  • Image Optimizer – Optimize Images and Convert to WebP or AVIF 》外掛總結:, , - Image Optimizer 是一個易於使用的 WordPress 外掛,透過壓縮和調整大小的技術來減少圖像大小,同時保留最高的圖像品質。, - Image Optimize...。
  • WP Super Cache 》本外掛可以從您的動態 WordPress 部落格生成靜態 HTML 檔案。在產生 HTML 檔案後,您的網頁伺服器會傳送該檔案,而不是處理比較沉重、耗費更多資源的 WordPre...。
  • WP Fastest Cache 》han PNG or JPEG, which means faster downloads and less data consumption for your visitors, Database Cleanup – Detect and delete unnecessary d...。
  • ManageWP Worker 》, Want to clone or migrate your WordPress website to a new host or domain? No problem! With ManageWP, you can easily clone or migrate your website ...。
  • W3 Total Cache 》W3 Total Cache (W3TC) 透過整合內容傳遞網絡 (CDN) 和最新最佳實踐等功能,提高網站性能、減少加載時間,增進 SEO、核心 Web 主要指標和整體用戶體驗。W3TC ...。
  • Speed Optimizer – The All-In-One Performance-Boosting Plugin 》SiteGround Optimizer 插件是由 SiteGround 開發的,可以大幅提高任何托管環境下的 WordPress 網站性能。, 最初設計用於 SiteGround 的服務器,現在已經有近 ...。
  • Autoptimize 》Autoptimize 能夠輕鬆優化您的網站。它可以整合、縮小和快取腳本和樣式表,在默認情況下向頁面 head 中注入 CSS,但也可以內嵌關鍵 CSS 並延遲整合的完整 CSS...。
  • AMP 》「Page Experience」(PX)是一組排名訊號,包括「核心網頁素質」(Core Web Vitals,CWV),用來測量使用者與網頁互動的使用體驗。AMP 是一個強大的工具,能...。
  • WebP Express 》ch means less bandwidth usage and faster page load times., Easy to use - with little effort, WordPress site admins can have their site serving auto...。
  • Breeze – WordPress Cache Plugin 》Breeze是由Cloudways團隊開發的一款免費、簡單(卻功能強大)且使用者友好的WordPress快取外掛。它提供不同層級的WordPress效能優化選項,在WordPress、搭配W...。
  • Jetpack Boost – Website Speed, Performance and Critical CSS 》使用 Jetpack Boost 優化網頁性能加速你的 WordPress 網站。輕鬆啟用一鍵優化,提升核心 Web 重要指標。, 你是否知道,更快的網站可以:, , 在 Google 搜尋排...。
  • Custom Fonts – Host Your Fonts Locally 》此外掛能協助您輕鬆地在 WordPress 網站中嵌入自定義字型檔案 (woff2、woff、ttf、svg、eot、otf)。, 目前能與以下主題和外掛一起使用:, , Astra 主題, Beav...。
  • Redis Object Cache 》一個由 Redis 提供支援的持久化物件快取後端。支援 Predis、PhpRedis (PECL)、Relay、複寫、哨兵、叢集化和 WP-CLI。, 若要調整連線參數、前綴的快取鍵或設定...。

文章
Filter
Apply Filters
Mastodon