Title: Gallery Block Lightbox
Author: taha.tr
Published: <strong>2024 年 7 月 30 日</strong>
Last modified: 2025 年 11 月 25 日

---

搜索插件

![](https://ps.w.org/easy-gallery-lightbox/assets/banner-772x250.jpg?rev=3128077)

![](https://ps.w.org/easy-gallery-lightbox/assets/icon.svg?rev=3128077)

# Gallery Block Lightbox

 作者：[taha.tr](https://profiles.wordpress.org/dmrhn/)

[下载](https://downloads.wordpress.org/plugin/easy-gallery-lightbox.0.6.zip)

 * [详情](https://cn.wordpress.org/plugins/easy-gallery-lightbox/#description)
 * [评价](https://cn.wordpress.org/plugins/easy-gallery-lightbox/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/easy-gallery-lightbox/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/easy-gallery-lightbox/#developers)

 [支持](https://wordpress.org/support/plugin/easy-gallery-lightbox/)

## 描述

This WordPress Plugin adds Lightbox feature to the core Gallery block with a simple
toggle button. Easily enable or disable it for any gallery block by selecting ‘media
file’ under the ‘link to’ dropdown. Once selected, the Lightbox toggle will appear.
It also supports custom coded galleries through a filter (check FAQ).

[dLightbox.js](https://github.com/tdmrhn/dLightbox.js) is fully responsive, supporting
touch, mousewheel, keyboard, and mouse drag interactions, double click or tap/touch
to zoom original image, build-in thumbnails, as well as slide counters and figcaption.
With no dependency on jQuery, dLightbox.js ensures optimal viewing experiences across
all devices.

Although extremely lightweight at only 2.78kb gzipped for both dLightbox.js and 
dLightbox.css, the plugin only loads assets into the page if there is a core Gallery
block or custom selectors defined via a filter.

### Features

 * Enable/disable with a simple toggle button for each Gallery block individually.
 * Custom coded galleries support.
 * Supports touch, mousewheel, keyboard, and mouse drag interactions.
 * Double click or tap/touch to zoom original image.
 * Lightbox thumbnails with an easy toggle button.
 * Slide counter and figcaption support.
 * jQuery-Free, lightweight at only 2.78kb gzipped for both dLightbox.js and dLightbox.
   css
 * Fully responsive.

## 屏幕截图

[[

[[

## 安装

 1. Download the plugin ZIP file.
 2. In your WordPress admin panel, navigate to Plugins -> Add New.
 3. Click the “Upload Plugin” button, choose the ZIP file you downloaded, and click“
    Install Now.”
 4. After installation, activate the plugin.

## 常见问题

### How do I enable the Lightbox for the core Gallery block?

Enable or disable the Lightbox feature for any gallery block by selecting ‘media
file’ under the ‘link to’ dropdown. Once selected, the Lightbox toggle will appear.

### Can I use Lightbox with my custom galleries?

Yes, you can use the lightbox with custom galleries by using the provided filter.
Example code is provided for reference.

add_filter( ‘dLightbox:custom:selectors’, function ( $selectors ) {
 $selectors 
= array_merge( $selectors, array(‘.my-gallery’, ‘.your-gallery’) ); return $selectors;});

### Is it mobile touch friendly?

dLightbox.js supports touch, mousewheel, keyboard, and mouse drag interactions.

### Is it supports thumbnails?

Yes it supports Lightbox thumbnails with an easy toggle. Also with “dLightbox-thumbnails”
class you can easily adapt thumbnails to your custom coded galleries.

### Is the lightbox responsive?

Yes, the lightbox feature provided by Gallery Lightbox is fully responsive, ensuring
optimal viewing experiences across all devices.

### Does it need jQuery?

No, there is no dependency on jQuery. dLightbox is custom coded from scratch, ensuring
efficient performance and compatibility with modern web development practices.

### Does the plugin impact page loading speed?

Although extremely lightweight at only 2.78kb gzipped for both dLightbox.js and 
dLightbox.css, the plugin only loads assets into the page if there is a core Gallery
block or custom selectors defined via a filter. This ensures minimal impact on page
loading speed.

### What if I encounter any issues or have feature requests?

If you encounter any issues, have feature requests, or need support, please visit
the GitHub repository and create an issue. Our team will be happy to assist you.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Gallery Block Lightbox」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ taha.tr ](https://profiles.wordpress.org/dmrhn/)

[帮助将「Gallery Block Lightbox」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/easy-gallery-lightbox)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/easy-gallery-lightbox/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/easy-gallery-lightbox/)，或通过[RSS](https://plugins.trac.wordpress.org/log/easy-gallery-lightbox/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/easy-gallery-lightbox/)。

## 更新日志

#### 0.6

 * Improved dLightbox.js code
 * Fixed an issue when toogle off thumbnails

#### 0.5

 * Improved dLightbox.js code
 * Added auto carousel to thumbnails container if wider than viewport

#### 0.4

 * Improved double click to zoom
 * Added double tap to zoom on mobile

#### 0.3

 * Added Zoom to original image size on double click

#### 0.2.1

 * Added Caption Toggle

#### 0.2

 * Added Dynamic Thumbnails

#### 0.1

 * Initial release

## 额外信息

 *  版本 **0.6**
 *  最后更新：**7 月前**
 *  活跃安装数量 **100+**
 *  WordPress 版本 ** 6.3 或更高版本 **
 *  已测试的最高版本为 **6.9.4**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/easy-gallery-lightbox/)
 * 标签
 * [carousel](https://cn.wordpress.org/plugins/tags/carousel/)[gallery](https://cn.wordpress.org/plugins/tags/gallery/)
   [gallery block](https://cn.wordpress.org/plugins/tags/gallery-block/)[lightbox](https://cn.wordpress.org/plugins/tags/lightbox/)
   [slider](https://cn.wordpress.org/plugins/tags/slider/)
 *  [高级视图](https://cn.wordpress.org/plugins/easy-gallery-lightbox/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/easy-gallery-lightbox/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/easy-gallery-lightbox/reviews/)

## 贡献者

 *   [ taha.tr ](https://profiles.wordpress.org/dmrhn/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/easy-gallery-lightbox/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://taha.tr/)