DEV Community

Cover image for PhotoSwipe - JavaScript gallery, no dependencies.
Alexandre Freire
Alexandre Freire

Posted on

PhotoSwipe - JavaScript gallery, no dependencies.

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).

https://photoswipe.com/

Top comments (0)