Add a touch-friendly image gallery to a website without installing a heavy framework.
Build a portfolio or photography site with swipe-to-navigate lightbox functionality on mobile and desktop.
Create a product showcase with pinch-to-zoom and gesture controls for better user experience.
PhotoSwipe is a JavaScript image gallery and lightbox for websites. A lightbox is the pattern where clicking a thumbnail opens a large version of the image in an overlay, and you can swipe or click through multiple images. PhotoSwipe is specifically designed to work well on both desktop browsers and mobile touchscreens, without depending on any JavaScript framework like React or Vue. The library is modular, meaning you import only the parts you need, and it has no external dependencies. It supports touch gestures like swipe and pinch-to-zoom on mobile devices and works independently of the page layout beneath it. This repository contains version 5, which represents a major rewrite. The source code lives in the src folder and the ready-to-use compiled files are in the dist folder. Documentation and a live demo are available at photoswipe.com. You would use PhotoSwipe when you want to add a polished image gallery experience to any website, particularly when you need it to look and feel good on phones as well as desktops, and when you want to avoid a dependency on a large UI framework.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.