Lightbox with PhotoSwipe 5 (dynamic caption)

The following examples use the “dynamic caption” with automatic placement beside or below the image. To see another variation with “overlay” caption, see this example.

Single image with caption:

This is a place in Augsburg.

A gallery with the Gutenberg gallery block:

Images in a tiled gallery (some images are quite large and may take a while to load!):

Example with NEXTGen Gallery

This image demonstrates using multicolumn captions:

The following image will show individually in the lightbox, since the link have a custom “data-lbwps-gid” property set – this may not work for everyone, since you have to add the HTML code manually or convert an existing image block to HTML first to be able to add this attribute:

Museum fΓΌr Kommunikation in Berlin

The code the image above:

<figure class="wp-block-image size-large"><a href="https://wordpress-demo.arnowelzel.de/wp-content/uploads/2022/06/IMG_20220306_145154-scaled.jpg" data-lbwps-gid="i1"><img src="https://wordpress-demo.arnowelzel.de/wp-content/uploads/2022/06/IMG_20220306_145154-1024x768.jpg" alt="Museum fΓΌr Kommunikation in Berlin" class="wp-image-569"/></a></figure>