I try to modify a Photoswipe snippet, kindly originally shared by @voytado, but I'm stuck. Anyone willing to help?
Changes1) Photoswipe should not expect gallery sections, but just work on every image on the page.
2) The Lightbox should use this Caption extension:
https://github.com/dimsemenov/photoswipe-dynamic-caption-pluginAs I have no experience with embedding 3rd party code, I asked ChatGPT for help. Photoswipe seems to load (but does not work), and according to devtools there seems to be an issue with that caption extension, here ChatGPT seems to have messed up.
Images have the class "img",
Content has the class "gallery"
Images have Alt-Text which can be shown show as a caption.
`<link rel="stylesheet" href="
https://cdnjs.cloudflare.com/ajax/libs/photoswipe/5.4.2/photoswipe.min.css"><link rel="stylesheet" href="
https://cdnjs.cloudflare.com/ajax/libs/photoswipe/5.4.2/photoswipe-dynamic-caption-plugin.css">Sample project:
https://p-54962e37-c530-4297-8102-211f840524e6.apps.webstudio.is/?authToken=0113317e-ceea-4678-8a4f-a49e9898ab60&mode=preview