How to use the img tag directly? #1942
<div id="galleries">
<img src="">
<img src="">
......
</div><script type="module">
import PhotoSwipeLightbox from '/photo-swipe/5.2.2/photoswipe-lightbox.esm.min.js';
const lightbox = new PhotoSwipeLightbox({
gallery: '#galleries',
children: 'img',
pswpModule: () => import('/photo-swipe/5.2.2/photoswipe.esm.min.js')
});
lightbox.init();
</script>The lightbox can be a normal call, but images are not showing. In my use case, What is needed I do? |
Answered by
dimsemenov
Jun 26, 2022
Replies: 1 comment
|
You may use You must define width, height, and the src. |
0 replies
Answer selected by
chuoke
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You may use
domItemDatafilter to parse a custom markup https://photoswipe.com/data-sources#custom-html-markupYou must define width, height, and the src.