Include DOM gallery builder in JS file
Please include the initPhotoSwipeFromDOM function shown in http://photoswipe.com/documentation/getting-started.html#dom-to-slide-objects in PhotoSwipe in a JS file. That would make it much easier to get started with a gallery.
Jan Pobořil commented
Why to do it? All competitors support loading from DOM, so developer does not need to touch JS.
Also will be nice to have this loader configurable, so I can e.g. use own Xpath for loading anchors, thumbnail url and all other sizes.
Jimmy Merrild Krag commented
I have made an improved version of the function that takes a default options argument. You can find it at https://pastebin.com/xJTE05sS