Again – how many images are used has nothing to do with the “Alow infinite loop” option.
Just turn the option off and you will see that nothing will change. The number of image used will still be the same. The option only controls if the image swiping will stop at the last image in Photoswipe or not.
Having all images from one post in its own lightbox is not possible. You must use either WordPress gallery blocks or Gutenberg gallery blocks and enable the option “Show WordPress galleries and Gutenberg gallery blocks in separate lightboxes”.
Edit:
The images from different posts have no indication from which post they are. Therefore the frontend script which collects the images for PhotoSwipe cannot know if one image is from post 1 and another image is from post 2.
If the “Show WordPress galleries and Gutenberg gallery blocks in separate lightboxes” is enabled, the backend will add a hook to the gallery output to create a unique gallery ID which will then be used by the frontend.
However to do this for post overviews as well, the plugin would need to hook to content loop and modify every post before the content loop outputs it.
BUT: the post content is already filtered at an earlier stage when rendering the post because when viewing a single post the Lightbox needs to work as well and not only on pages which have a content loop. This would mean, that every single post would have to processed TWICE – once after the post was rendered and a second time during the content loop of the theme. This would create a lot of additional load to the server for a very specific use case which is usally never relevant – if you display 30 images on the homepage because a user usually expects to be able to swipe through all images and not only the 4 or 10 of one post.
-
This reply was modified 2 years, 11 months ago by Arno Welzel.
-
This reply was modified 2 years, 11 months ago by Arno Welzel.