WordPress itself does not have a “native” lightbox, this must be another plugin or theme (maybe you are using a gallery plugin which has its own lightbox – then ask the maintainer of that gallery plugin how to disable the lightbox of it).
Also do not use any “script optimizer” – this will not work with PhotoSwipe since that is modular JavaScript code which will not work when an “optimizer” just merges it together with all other JavaScript files on your website. Either disable it or exclude Lightbox with PhotoSwipe from any kind of optimization.
Hi @awelzel, thanks for getting back to me!
WordPress does have a basic lightbox features since version 6.4, yes: https://learn.ww.wp.xz.cn/tutorial/exploring-wordpress-6-4/
I’ve tested disabling my only “script optimizer” plugin, which is Perfmatters, and it doesn’t make any difference.
The conflict seems to be with Imagify [https://ww.wp.xz.cn/plugins/imagify/], as per my testing. When I disable it, Lightbox with PhotoSwipe starts working. Any idea why? Imagify is very important to us.