Title: LMDM Lightbox Image Caption
Author: nicmare
Published: <strong>2026 年 6 月 15 日</strong>
Last modified: 2026 年 6 月 15 日

---

搜索插件

![](https://s.w.org/plugins/geopattern-icon/lmdm-lightbox-image-caption.svg)

# LMDM Lightbox Image Caption

 作者：[nicmare](https://profiles.wordpress.org/nicmare/)

[下载](https://downloads.wordpress.org/plugin/lmdm-lightbox-image-caption.1.0.0.zip)

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

 [支持](https://wordpress.org/support/plugin/lmdm-lightbox-image-caption/)

## 描述

WordPress ships with a native Lightbox-Effect for image blocks. This plugin adds
one tiny additional option to the core image and gallery blocks: `Show Caption`.

When the toggle is enabled, the native lightbox receives the current image alt text
as a `data-img-alt` attribute on the enlarged lightbox figure. A small frontend 
CSS then displays that value as a caption overlay inside the lightbox image.

Please note: The caption text is taken from the image `alt` attribute.

The toggle is only available when the native Lightbox-Effect is active. If the lightbox
is disabled or the image is linked somewhere else, the caption option is disabled
as well.

### Plugin Features

✔ adds a new toggle `Show caption` to the core Image block
 ✔ adds the same toggle
to the core Gallery block ✔ the toggle can only be enabled when the native Lightbox-
Effect is active ✔ ships with German translation files for the editor toggle ✔ uses
the image `alt` attribute as value for `data-img-alt` ✔ adds the attribute only 
to the enlarged image figure in the lightbox ✔ supports galleries by passing the
gallery setting to the nested image blocks ✔ outputs the value with a lightweight
frontend CSS pseudo element ✔ uses no new block and does not replace the existing
Image or Gallery blocks

## 安装

 1. Upload the plugin files to the `/wp-content/plugins/lmdm-lightbox-image-caption`
    directory, or install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the **Plugins** screen in WordPress.
 3. Open a post or page in the block editor.
 4. Add or select an **Image** or **Gallery** block.
 5. Enable the native Lightbox-Effect first.
 6. Enable `Show caption` in the Lightbox panel.

## 常见问题

### Does it create a new block?

No, it only extends the existing core Image and Gallery blocks.

### Does it use the normal image caption field?

No. It uses the image `alt` attribute and writes it to `data-img-alt` in the native
lightbox overlay.

### Why is the toggle disabled?

The toggle is only active when the native WordPress Lightbox-Effect is enabled. 
If the image links to a media file, attachment page or custom URL, the native lightbox
is not active and the option is disabled.

### Does it work with galleries?

Yes. Enable the native Lightbox-Effect for the gallery first and then enable `Show
caption`. The setting is passed to the gallery images when the block is rendered.

### Does it load any additional assets in the frontend?

Yes, it loads one small CSS file that displays the `data-img-alt` value as a pseudo
element in the native lightbox overlay.

### What happens when i disable the plugin?

The additional toggle and frontend caption output disappear. Existing Image and 
Gallery blocks continue to work as normal core blocks.

### Who is the author of the plugin?

The WordPress-User “nicmare” vibe coded it. Means he had the idea of the plugin 
and uses AI to craft the code.

## 评价

此插件暂无评价。

## 贡献者及开发者

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

贡献者

 *   [ nicmare ](https://profiles.wordpress.org/nicmare/)

[帮助将「LMDM Lightbox Image Caption」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/lmdm-lightbox-image-caption)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.0.0

 * first release of the plugin
 * added German translation files for the editor toggle

## 额外信息

 *  版本 **1.0.0**
 *  最后更新：**4 天前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 6.9 或更高版本 **
 *  已测试的最高版本为 **7.0**
 *  PHP 版本 ** 8.0 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/lmdm-lightbox-image-caption/)
 * 标签
 * [caption](https://cn.wordpress.org/plugins/tags/caption/)[gallery](https://cn.wordpress.org/plugins/tags/gallery/)
   [image](https://cn.wordpress.org/plugins/tags/image/)[lightbox](https://cn.wordpress.org/plugins/tags/lightbox/)
   [LMDM](https://cn.wordpress.org/plugins/tags/lmdm/)
 *  [高级视图](https://cn.wordpress.org/plugins/lmdm-lightbox-image-caption/advanced/)

## 评级

尚未提交反馈。

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

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

## 贡献者

 *   [ nicmare ](https://profiles.wordpress.org/nicmare/)

## 支持

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

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