After some more trial and error I managed to fix this problem myself already…
Oh ignore my last comment! Immediately after posting it I decided to delete my old optimizer theme files and download a fresh version. For some reason this fixed my problem. Not sure why because it’s not a newer version, but atleast my problem is gone now.
Thanks for the help anyways!
I’ve tried disabling all plugins except the lightbox gallery. Unfortunately it didn’t fix the problem.
I’ve switched themes In the meantime to test if that works, and that did fix the problem. So it has to do with the theme that I’m using apperently. Do you think that there’s still a way to fix it?