dimsemenov/PhotoSwipe

JavaScript image gallery for mobile and desktop, modular, framework independent

JavaScript

25,272

602 commits

updated Dec 4, 2025

See the code

README

FEEDBACK NEEDED I am developing the new version - PhotoSwipe v6, please read about upcoming changes and leave feedback.

PhotoSwipe v5 — JavaScript image gallery and lightbox

Demo | Documentation

Sponsor via OpenCollective Follow on Twitter

Repo structure

  • dist/ - main JS and CSS
  • src/ - source JS and CSS.
    • src/js/photoswipe.js - entry for PhotoSwipe Core.
    • src/js/lightbox/lightbox.js - entry for PhotoSwipe Lightbox.
  • docs/ - documentation markdown files.
  • demo-docs-website/ - website with documentation, demos and manual tests.
  • build/ - rollup build config.

To build JS and CSS in dist/ directory, run npm run build.

To run the demo website and automatically rebuild files during development, run npm install in demo-docs-website/ and npm run watch in the root directory.

Older versions

Documentation for the old version (v4) can be found here and the code for 4.1.3 is here.

Stand With Ukraine


This project is tested with BrowserStack.

gallery
image
javascript
lightbox

dimsemenov/PhotoSwipe

JavaScript image gallery for mobile and desktop, modular, framework independent

JavaScript

25,272

602 commits

updated Dec 4, 2025

See the code

README

FEEDBACK NEEDED I am developing the new version - PhotoSwipe v6, please read about upcoming changes and leave feedback.

PhotoSwipe v5 — JavaScript image gallery and lightbox

Demo | Documentation

Sponsor via OpenCollective Follow on Twitter

Repo structure

  • dist/ - main JS and CSS
  • src/ - source JS and CSS.
    • src/js/photoswipe.js - entry for PhotoSwipe Core.
    • src/js/lightbox/lightbox.js - entry for PhotoSwipe Lightbox.
  • docs/ - documentation markdown files.
  • demo-docs-website/ - website with documentation, demos and manual tests.
  • build/ - rollup build config.

To build JS and CSS in dist/ directory, run npm run build.

To run the demo website and automatically rebuild files during development, run npm install in demo-docs-website/ and npm run watch in the root directory.

Older versions

Documentation for the old version (v4) can be found here and the code for 4.1.3 is here.

Stand With Ukraine


This project is tested with BrowserStack.

gallery
image
javascript
lightbox

Project health

Overall

2.9/10

Maintained

0/10

Code review

1/10
OpenSSF Scorecard

Latest release

5.4.4 · May 24, 2024

Releases this year

0

Significant stargazers

(top 24 of 112)

Volodymyr Agafonkin

6,260 followers · starred May 2023

Orta Therox

6,294 followers · starred Apr 2011

Guillaume Gomez

1,661 followers · starred Jan 2019

Pascal Hertleif

970 followers · starred Dec 2014