Lightbox with PhotoSwipe 5 (overlay caption)

The following example shows using PhotoSwipe 5 with overlay captions. This type of caption will be displayed above the image and will also be removed when the UI is hidden.

To see another variation with “dynamic” caption, see this example.

This image demonstrates using multicolumn captions:

About PhotoSwipe 5

PhotoSwipe 5 by Dmytro Semenov has much better support for mobile devices with iOS 13 and better performance due to its modular structure. It is also easier to extend its functionality using plugins or event handlers.

Due to changes in PhotoSwipe 5 some features will likely never be available in Lightbox with PhotoSwipe:

  • URL navigation where the URL gets modified with each image displayed, so you can link to images in the lighbox directly as in PhotoSwipe 4. So far linking to an image is supported to keep existing links valid, but PhotoSwipe itself does not support the history API any more.
  • “Swipe” animation in desktop mode.
  • Custom modes for mouse wheel (the wheel is now always used for specific operations like Strg+wheel for zooming and scrolling in zoomed state).

Since PhotoSwipe 5 is now modular, it will now only be used in its original form and only be extended by plugins.