Cover image for PhotoSwipe - JavaScript gallery, no dependencies.

PhotoSwipe - JavaScript gallery, no dependencies.

alexandrefreire profile image Alexandre Freire ・1 min read

All basic gestures are supported: flick to the next or previous image, spread to zoom in, drag to pan, pinch to zoom out or close, tap to toggle the controls, double-tap to zoom.

First things that you should know before you start:

PhotoSwipe is not a simple jQuery plugin, at least basic JavaScript knowledge is required to install.

PhotoSwipe requires predefined image dimensions (more about this).
If you use PhotoSwipe on non-responsive website – controls will be scaled on mobile (as the whole page is scaled). So you'll need to implement custom controls (e.g. single large close button in top right corner).



markdown guide