So after testing it a bit, it seems to be not possible, since the lightbox instances that the bricksPhotoswipe() function creates, aren’t stored in a global variable or a publicly accessible data structure.
And even if they were, I’m not sure that it’ll work since the documentation of PhotoSwipe suggests, that a destroyed instance can’t be reinitialized.
Maybe you can create another Thread as a Bug-Report. For me it kind of worked, but only if I did in fact click on a newly loaded image. When clicking on an image that was there before the ajax request, the newly added images weren’t part of the slides.
This was my Elements Setup btw:
{"content":[{"id":"bgyvhp","name":"section","parent":0,"children":["atrkiv"],"settings":[]},{"id":"dwedgc","name":"block","parent":"atrkiv","children":["dibuel"],"settings":{"hasLoop":true,"query":{"posts_per_page":"3","ajax_loader_animation":"default"}}},{"id":"dibuel","name":"image","parent":"dwedgc","children":[],"settings":{"image":{"useDynamicData":"{featured_image}","size":"large"},"link":"lightbox","lightboxId":"test"}},{"id":"prxhxx","name":"button","parent":"atrkiv","children":[],"settings":{"text":"Load more","style":"primary","tag":"button","_interactions":[{"id":"bkxbjp","trigger":"click","action":"loadMore","loadMoreQuery":"dwedgc"}]}},{"id":"atrkiv","name":"container","parent":"bgyvhp","children":["dwedgc","prxhxx"],"settings":{"_display":"grid","_gridTemplateColumns":"repeat(3,1fr)","_gridGap":"30"}}],"source":"bricksCopiedElements","sourceUrl":"https://testsite.local","version":"2.0.1","globalClasses":[],"globalElements":[]}
Best Regards
Suat