[WordPress] 外掛分享: Lightbox for Gallery & Image Block

前言介紹

  • 這款 WordPress 外掛「Lightbox for Gallery & Image Block」是 2020-06-03 上架。
  • 目前有 20000 個安裝啟用數。
  • 上一次更新是 2025-04-15,距離現在已有 19 天。
  • 外掛最低要求 WordPress 5.4 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 5.3 以上。
  • 有 84 人給過評分。
  • 論壇上目前有 6 個提問,問題解答率 67% ,不低,算是個很有心解決問題的開發者團隊了!

外掛協作開發者

goaroundagain |

外掛標籤

block | image | gallery | lightbox | block-editor |

內容簡介

這個 WordPress 外掛為標準 WordPress 圖庫及圖像區塊新增了一個簡單輕量的 Lightbox,它可以偵測文章是否包含圖庫或圖像區塊,然後載入並啟動 baguetteBox.js,這是一個純 JavaScript 輕量級輪播套件,沒有任何依賴,且具有現代極簡風格。

這個外掛無鎖定效應。它不會新增 Block Editor/Gutenberg 區塊,且僅依賴標準 WordPress 圖庫和圖像區塊。您可以隨時停用此外掛,且您的圖庫和圖像區塊將如之前一樣運作。只是沒有輕箱效果。

只需記住一件很重要的事情:您必須為所有圖庫和圖像選擇「鏈結到→媒體檔案」才能正確運作。如果您選擇「無」或「附件頁面」,它將無法運作。但如果您不想為特定圖像或圖庫啟用輕箱效果,這樣做也沒有問題。

功能

以下是 baguetteBox.js 的功能:

純 JavaScript 編寫
無依賴 (例如 jQuery)
支援圖像標題
自適應
支援滑動手勢
大小約 13 KB,gzip 壓縮後約 7 KB

相容性

圖庫區塊 (預設區塊)
圖像區塊 (預設區塊)
媒體與文字區塊 (預設區塊)
圖庫 (預設經典編輯器圖庫)
CoBlocks 圖庫拼貼 / 瀑布流 / 位移 / 疊放
Meow 圖庫 (+ 圖庫區塊)
GenerateBlocks 圖像 (設定「啟用動態資料」→「連結來源」為「單一圖像」)

不要忘記為所有圖庫和圖像選擇「鏈結到→媒體檔案」,以使其正確運作。

注意:目前僅支援文章內的區塊,不支援小工具內的區塊。您可以讓它運作,但必須自行併入必要的樣式和 script 。請參閱 FAQ → 如何併入必要的資產 (script 和樣式),以便為文章外的區塊或預設不支援的區塊類型併入必要的資產?

原文外掛簡介

This WordPress Plugin adds a simple & lightweight Lightbox to the standard WordPress Gallery & Image Block. It detects if a post contains a Gallery or Image Block and then loads & initialize baguetteBox.js, a pure JavaScript Lightbox script without any dependencies and a modern minimal look.
There is no lock in effect. It does not add a new Block Editor/Gutenberg Block and relies solo on the standard WordPress Gallery and Image Block. You can deactivate this plugin at any time and your Gallery and Image Blocks will work as they’ve done before. Just without the lightbox.
Just one important thing to remember: You always have to select Link → Link to image file or Link images to media file (see screenshots below) for all of your Image & Gallery Blocks to work properly. If you choose None or Link to attachment page it will not work. But that’s fine if you don’t want the Lightbox for a specific Image or Gallery.
Take a look at the YouTube video from Jakson where he reviews this plugin:

Features
Here are the features of baguetteBox.js:

Written in pure JavaScript
No dependencies (e.g. jQuery)
Image captions support
Responsive
Supports swipe gestures
Around 13 KB, 7 KB gzipped

Works with

Gallery Block (Default Block)
Image Block (Default Block)
Media and Text Block (Default Block)
Gallery (Default Classic Editor Gallery)
CoBlocks Gallery Collage / Masonry / Offset / Stacked
Meow Gallery (+ Gallery Block)
GenerateBlocks Image (Set Enable Dynamic Data → Link source to Single image)

Don’t forget to select Link to → Media File for all of your Galleries & Images to work properly.
Notice: At the moment, just Blocks inside a post are supported. Not Blocks in a Widget. You can make it work but have to enqueue the necessary style & script yourself. See FAQ –> How to enqueue the necessary assets (script & style) for blocks outside of posts or for block types that are not supported by default?

各版本下載點

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

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


1.11 | 1.12 | 1.13 | 1.14 | 1.15 | 1.16 | 1.1.0 | 1.1.1 | 1.2.0 | 1.3.0 | 1.3.1 | 1.4.0 | 1.5.0 | 1.6.0 | 1.7.0 | 1.8.0 | 1.8.1 | 1.8.2 | 1.8.3 | 1.8.4 | 1.8.5 | 1.9.0 | 1.10.0 | 1.10.1 | 1.16.0 | 1.10.0.1 |

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

  • Image Optimization by Optimole – Lazy Load, CDN, Convert WebP & AVIF, Optimize Images 》, Optimole的獨特之處在哪裡?, , 更小的圖片,同樣的品質, 完全自動化;設定一次就忘記它, 支援所有圖片格式, 支援Retina和WebP圖片, 以機器學習為基礎的自...。
  • Imsanity 》使用 Imsanity,自動調整大型圖片上傳大小。選擇你喜歡的尺寸和品質,讓 Imsanity 完成其餘所有工作。當投稿者上傳大於配置尺寸的圖片時,Imsanity 將自動將...。
  • Firelight Lightbox 》Easy FancyBox WordPress外掛為您的網站提供靈活美觀的光箱解決方案,幾乎適用於網站上的所有媒體連結。Easy FancyBox使用更新的傳統FancyBox jQuery擴展版本...。
  • Simple Lightbox 》Simple Lightbox 是一個非常簡單且可自定義的燈箱,在您的 WordPress 網站上添加它非常容易。, 功能, 自定義燈箱行為的選項位於外觀 > Lightbox 管理員菜...。
  • Robin image optimizer — save money on image compression 》需要專業支援嗎?, 開始免費支援, 開始高級支援, 透過減少圖像大小,讓您的網站加快速度。我們的 WordPress 圖像優化外掛,可以將圖像大小減少80%,而且不損...。
  • Responsive Lightbox & Gallery 》提供完整的 WordPress 相簿外掛所需一切, Responsive Lightbox and Gallery 外掛是一個全功能的 WordPress 相簿外掛,擁有強大的拖放相簿生成器和 Lightbox ...。
  • reSmush.it : The original free image compressor and optimizer plugin 》reSmush.it Image Optimizer 是一個 WordPress 外掛,透過 reSmush.it API 提供圖片優化服務。reSmush.it 使用多種高級演算法對圖像進行大小減小。API 支援最...。
  • Menu Image, Icons made easy 》這個外掛可以輕鬆地在選單項目中加入圖像或圖示,打造更好的網站選單。, 可以控制圖像或圖示的位置以及大小。, 這個 Menu Image 外掛還有其他功能,以下是其...。
  • Image Widget 》Image Widget 是一個簡單的外掛程式,利用 WordPress 原生媒體管理員,為您的網站新增圖片小工具。, 需要新增幻燈片、燈箱或隨機圖像嗎?, 請查看 Image Widg...。
  • Featured Image from URL (FIFU) 》h3>WordPress 外掛 - 用於顯示外部特色圖片、影片、音訊等等, FIFU 自 2015 年來已幫助全球數千個網站節省了儲存空間、處理時間和版權費用。, 如果您已經厭倦...。
  • Default Featured Image 》在媒體設定頁面上新增一個預設的特色圖像。如果沒有設定任何特色圖像,這個預設的特色圖像就會顯示。就這麼簡單。, 查看常見問題以獲取基本問題資訊。, 如果...。
  • All In One Favicon 》查看最新的WordPress交易以優化您的網站。, All In One Favicon為您的網站和管理頁面添加favicon。, 您可以使用您已經上傳的favicon或使用內置的上傳機制將fa...。
  • ImageMagick Engine 》透過讓 WordPress 使用 ImageMagick 而非標準的 GD 圖像庫,大幅提升重新調整大小的圖像品質。, 功能, , 在重新調整大小的圖像中保留嵌入式色彩設定檔, 自動...。
  • WP Featherlight – A Simple jQuery Lightbox 》WP Featherlight 是一個 WordPress 外掛,可為您的WordPress 網站添加一個極簡、高效、響應式 jQuery 燈箱。在其核心,WP Featherlight是一個用於 Featherlig...。
  • Phoenix Media Rename 》通過使用「Phoenix Media Rename」外掛,將您的媒體檔案重新命名,極大地提高您的 SEO。, 在Phoenix Media Rename 官方頁面上提供了完整的使用和設置指南。。

文章
Filter
Apply Filters
Mastodon