Drupal is a registered trademark of Dries Buytaert
Release: Leaflet 10.4.11 Minor update available for module leaflet (10.4.11). Release: Session Inspector 1.0.8 Minor update available for module session_inspector (1.0.8). Release: Migrate QA 2.0.4 Minor update available for module migrate_qa (2.0.4). Release: CKEditor Description List 3.0.0 Major update available for module ckeditor_descriptionlist (3.0.0). Release: FlowDrop 2.4.0 Minor update available for module flowdrop (2.4.0). Release: JWT Token Refresh 1.0.4 Minor update available for module jwt_token_refresh (1.0.4). Release: ConReg 1.0.0-beta1 First beta version released for module conreg (1.0.0-beta1). Release: AI Image Studio 1.0.0-beta8 New beta version released for module ai_image_studio (1.0.0-beta8). Usage Milestone: Role Theme Switcher Module role_theme_switcher crossed 1,000 active installs. Module Revived: Decoupled Router 2.0.7 Module decoupled_router updated after 11 months of inactivity (2.0.7).

Blazy PhotoSwipe

1,640 sites Security covered
View on drupal.org

This module integrates the PhotoSwipe image viewer with Blazy. It allows images displayed using Blazy formatters in fields and views to open in a swipeable PhotoSwipe gallery, including support for videos.

Provides a simple Blazy PhotoSwipe integration.

Apologies!
  • BP:8.x-1.4 is the last version which is compat between Blazy 1.x and 2.x, or PhotoSwipe 1.x and 2.x.

Requirements

  • Blazy (>=Blazy:2.18 including Blazy:3.x since BP:8.x-1.6+).
  • PhotoSwipe, optional to avoid unfixable CS issues with PSWP 5 since BP:8.x-1.5+. Both library versions will just work with/ without it.

Versions

Specific for PhotoSwipe 5:

  • Blazy (2.18+ || 3.x+).
  • BP 1.6+ || 2.x supports only v5.4.1.
  • BP 1.4+ supports only v5.3.7 (broken at some point due to breaking changes, as usual).
  • BP 1.3 supports only v5.1.7.

"Only" means the only tested versions. Normally broken if mismatched. For cross-compatibility, be sure to name the library folder as photoswipe, not PhotoSwipe, if any issues.

Features

  • Supports PhotoSwipe v4 and v5.1.7 since 1.3. Be sure to have the correct library, see PS4 to PS5 below.
  • Vanilla JavaScript, no jQuery required.
  • Has no formatter, instead integrated into "Media switcher" option of blazy-related contribs. This means PhotoSwipe will be available for free at Blazy, GridStack, Slick, Splide, Mason, and any blazy sub-modules which have field formatters, including Blazy Views fields for file ER and Media Entity. Either as Blazy static grids, Slick carousel single or multiple row grids, or GridStack dynamic grids.
  • Supports swipeable Videos if Video Embed Media (Blazy 1.x) or core Media (Blazy 2.x+) is installed.
  • Responsive image pan zoom is only available at PhotoSwipe library v5 and Blazy 2.3+ || 3.x+.

Installation

Usages

  • Go to any "Manage display" page, e.g.:
    admin/structure/types/manage/page/display
  • Find a Blazy, GridStack, Splide, Slick, or Mason formatter under "Manage display" for Image or Media fields.
  • Choose "Image to photoswipe" under "Media switcher" option. Adjust anything else accordingly.
  • Also available at Blazy Views fields under the same "Media switcher" option for File ER, or Media Entity, if using Blazy Views field.

How to change from PS4 to PS5, and vice versa

Repeat this every time changing library major versions.

  • Change the library accordingly and manually at your libraries folder.
  • Visit Blazy UI: /admin/config/media/blazy, and find PhotoSwipe under Extra settings.
  • Must clear cache due to cached hook_alter, and or regenerate CSS and JS assets only if needed: /admin/config/development/performance.
  • Ensure you can view the JS files in browsers manually, and press F5:
    • /libraries/photoswipe/dist/photoswipe.min.js?rblj1v
    • /modules/contrib/blazy_photoswipe/js/blazy.photoswipe.min.js?rblj1v
    • /modules/contrib/blazy_photoswipe/js/blazy.photoswipe5.min.js?rblj1v

    Change the token after "?" as per your install. Press CTRL/CMD + U for sure, and press End to reach them out.

  • Ensure you see the correct library version at the top of the file: 4 or 5, only if changing them. By default, always 4.
  • If you have file permission issues: 404 (not found) or 403 (forbidden), please fix it accordingly and manually at your server.
  • Only if any issues, use Drupal UI to clear cache, if drush cr failed. Also press CTRL/CMD + R or F5 to clear/ refresh browser cache. Some browsers are stubborn due to caches.
  • Disable BigPipe if any errors noticed with keyword BigPipe due to unwanted CSS and JS re-ordering issues. Should be no BigPipe issues since Blazy:3.0.9.
Any reference to Media Entity (ME) or Video Embed Media (VEM) is deprecated for core Media with oEmbed at Blazy 2.x+.

Activity

Tracked releases
1
Tracked since
Jul 2026
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
3.0.x-dev Dev Jul 6, 2026