This is my way of adding PhotoSwipe to Astro, while using Astro's built-in image optimization features. If you are trying to add PhotoSwipe to an existing Astro project, read my blog post.
If you are using ViewTransitions, please check out the viewtransitions
branch.
You think you have a better solution? Feel free to roast me by opening an issue on this repo!
We are all human and prone to mistakes.