A Rehype extension to add data-pswp-width and data-pswp-height attributes to img tags.
npm install @matfire/rehype-photoswipe
import rehype from 'rehype'
import rehypePhotoswipe from '@matfire/rehype-photoswipe'
const html = await rehype()
.use(rehypePhotoswipe)
.process('...')