Use Next.js advanced <Image/> component with the static export functionality. Optimizes all static images in an additional step after the Next.js static export.
Why do you think that https://github.com/michelecocuccio/simple-react-lightbox is a good alternative to next-image-export-optimizer