Default handler for PhotoSwipe.
Download a latest package or use Composer:
composer require frontpack/photoswipe-handler
Include PhotoSwipe and photoswipe-handler.js
file to HTML page.
<link rel="stylesheet" href="/path/to/photoswipe/photoswipe.css">
<link rel="stylesheet" href="/path/to/photoswipe/default-skin/default-skin.css">
<script src="/path/to/photoswipe/photoswipe.min.js"></script>
<script src="/path/to/photoswipe/photoswipe-ui-default.min.js"></script>
<script src="/path/to/photoswipe-handler.js"></script>
Single photo
<a href="/path/to/original.jpg" class="photoswipe" data-size="<original size of image>">...</a>
<a href="/path/to/original.jpg" class="photoswipe" data-size="1024x768">...</a>
Gallery
<a href="/path/to/original.jpg" class="photoswipe" data-size="<original size of image>" data-gallery="<gallery-id>">...</a>
<a href="/path/to/original.jpg" class="photoswipe" data-size="1024x768" data-gallery="my-gallery">...</a>
License: New BSD License
Author: Jan Pecha, https://www.janpecha.cz/