PhotoSwipe README

The project's README from github.com/dimsemenov/PhotoSwipe. As one markdown file: README.md.

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

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.

PhotoSwipe (dimsemenov/PhotoSwipe)

modular
Searching Database…

What is this?PhotoSwipe is a JavaScript image gallery and lightbox for mobile and desktop — modular, framework-independent code you add to your own web pages.
Is this a library I add to my own site, or a hosted gallery service?It's a front-end library, not a service: you include its JavaScript and CSS in your page and attach it to your own markup. It works without any particular framework.
How do I add it to a webpage?Prebuilt files ship in the dist/ folder — take the main JS and CSS from there and include them in your page. To rebuild them from src/, run npm run build.
Does it need jQuery or a framework like React to work?No. The package has zero runtime dependencies and is framework independent, so it drops into plain HTML as easily as into a React or Vue project.
There are tons of old PhotoSwipe tutorials around — which version is current?v5 is the current version. v6 is in development and the author is asking for feedback on the upcoming changes, while docs and code for v4 (4.1.3) remain available for legacy projects.
Will it behave the same on phones and desktop browsers?It is built for both mobile and desktop, and the project is tested with BrowserStack across browsers.
What is the difference between PhotoSwipe Core and PhotoSwipe Lightbox?The source ships two entries: src/js/photoswipe.js for PhotoSwipe Core — the gallery engine itself — and src/js/lightbox/lightbox.js for PhotoSwipe Lightbox, a ready-to-use wrapper built on top of it.
Is the project still being actively developed?Yes. Work on v6 is underway with the author requesting community feedback, the codebase is regularly tested through BrowserStack, and the project has been around since 2011 with roughly 25k GitHub stars.
Creator
dimsemenov
Size
29.8 MB
Stars
25.3K
Age
15y
Commits · 90 Days