dimsemenov

    dimsemenov/PhotoSwipe

    #326 this week

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

    web
    gallery
    image
    javascript
    lightbox
    JavaScript
    MIT
    25.2K stars
    3.3K forks
    25.2K GitHub watchers
    Updated 8/20/2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Use Cases & Benefits

    • PhotoSwipe is a JavaScript image gallery and lightbox solution designed for both mobile and desktop platforms.
    • It is modular, framework-independent, and supports easy integration with various web projects.
    • The project is mature, actively maintained since 2011, and highly popular with nearly 25,000 stars and 3,000 forks.
    • Organizations can use PhotoSwipe in production to provide responsive, touch-friendly image galleries with extensive customization options.
    • Ideal use cases include e-commerce sites, photography portfolios, and any web application requiring a robust, mobile-optimized image viewer.

    About PhotoSwipe

    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.

    Discover Repositories

    Search across tracked repositories by name or description