The problem turned out to be a Lightbox plugin: Simple Lightbox. I used another plugin: Query Monitor to find it, as suggested in the comments by Jacob.
The problem turned out to be a Lightbox plugin: Simple Lightbox. I used another plugin: Query Monitor to find it, as suggested in the comments by Jacob.