plugin-icon

LMDM Lightbox Image Caption

作者:nicmare·
Adds a lightbox-only image caption toggle for core Image and Gallery blocks.
版本
1.0.0
最后更新
Jun 15, 2026

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

免费基于付费套餐
通过安装,您同意 WordPress.com 服务条款第三方插件条款
目前已测试版本
WordPress 7.0
这个插件是可用的下载,适用于您的站点。