[WordPress] 外掛分享: Crazy Lazy

首頁外掛目錄 › Crazy Lazy
WordPress 外掛 Crazy Lazy 的封面圖片
600+
安裝啟用
★★★★
4.5/5 分(14 則評價)
1874 天前
最後更新
問題解決
WordPress 3.6+ v1.2.0 上架:2013-08-28

內容簡介

警告:Crazy Lazy 已經到達生命週期的終點。WordPress 5.5+ 支援使用本地 HTML loading 屬性的核心延遲加載圖像,請使用替代外掛 Lazy Loader。

Crazy Lazy 通過高效地顯示圖像,幫助提高您的博客或網站的性能。當一個頁面通常顯示一些圖像時,Crazy Lazy 將阻止那些圖像加載,只有當用戶滾動到頁面並到達實際應該顯示圖像的位置時,該特定圖像才會從服務器加載。

通過僅在需要時加載圖像,Crazy Lazy 可以減少頁面加載時間和(可能昂貴的)流量。

這個延遲加載外掛程序非常精簡,不需要任何設置:啟用即可使用。根據主題或 jQuery 使用 Crazy Lazy 可以選擇使用修改版的 jQuery 外掛 Unveil.js 或本地 JavaScript 库 lazyload.js。

風格

圖像的占位符可以進行樣式設置,例如:

img[src*='data:image/gif;base64'] {
border: 1px dashed #dbdbdb;
}

img.crazy_lazy {
background: url(/wp-includes/images/wpspin-2x.gif) no-repeat center center;
background-size: 16px 16px;
}

排除圖像

可以通過向不應由插件延遲加載的圖像添加數據屬性 data-crazy-lazy="exclude" 或 data-skip-lazy 來排除某些圖像。
另外,您可以添加 CSS 類 crazy_lazy 或 skip-lazy。這些 CSS 類也可以添加到圖像塊。

支援

通過 WordPress.org 上的 支援論壇 獲得社群支援
我們不處理電子郵件、Twitter、GitHub 問題等支援。

貢獻

此外掛模組的積極開發在 GitHub 上進行。
非常感謝記錄的錯誤提交請求。
如果您認為您發現了錯誤(例如,您遇到了意外的行為),請先在支援論壇 上發帖。
如果您想幫助我們翻譯此外掛程序,請在 WordPress 翻譯上進行翻譯。

創作者

作者:Sergej Müller
維護者:pluginkollektiv

外掛標籤

開發者團隊

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

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

原文外掛簡介

Warning: Crazy Lazy has reached end of life. WordPress 5.5+ supports lazy-loading of images in Core based on the native HTML loading attribute. If you look for an alternative plugin, we recommend to use Lazy Loader instead.
Crazy Lazy helps increasing the performance of your blog or website by displaying images efficiently. When a page would usually display some images, Crazy Lazy will prevent those images to load. Only when a user scrolls down the page and reaches the position where an image actually should be displayed, that particular image will be loaded from the server.
By loading images only when needed, Crazy Lazy will reducing page loading times and (potentially costly) traffic.
This Lazy Load plugin is structured very lean and does not require any settings: activate, done. Depending on the theme or the usage of jQuery Crazy Lazy optionally will utilze a modified version of the jQuery plugin Unveil.js, or the native JavaScript library lazyload.js.
Styling
Placeholders for images can be styled, i.e. like this:
img[src*='data:image/gif;base64'] {
border: 1px dashed #dbdbdb;
}

img.crazy_lazy {
background: url(/wp-includes/images/wpspin-2x.gif) no-repeat center center;
background-size: 16px 16px;
}

Excluding images
It’s possible to exclude some images from the lazy loading. This can be achieved by adding a data attribute data-crazy-lazy="exclude" or data-skip-lazy to the images that should not lazy loaded by the plugin.
Alternatively you can add a CSS class crazy_lazy or skip-lazy. These CSS classes can also be added to the image block.
Support

Community support via the support forums on wordpress.org
We don’t handle support via e-mail, Twitter, GitHub issues etc.

Contribute

Active development of this plugin is handled on GitHub.
Pull requests for documented bugs are highly appreciated.
If you think you’ve found a bug (e.g. you’re experiencing unexpected behavior), please post at the support forums first.
If you want to help us translate this plugin you can do so on WordPress Translate.

Credits

Author: Sergej Müller
Maintainers: pluginkollektiv

延伸相關外掛

文章
Filter
Apply Filters
Mastodon