Gallery links not working

I have a client with a wordpress site which has a gallery where the thumbs have a lightbox effect. Suddenly, galleries in new posts are malfunctioning. The old posts are still intact. The thumbs display as normal but when you click the links the link has the wrong pathway.

I have disabled all recent plugins but with no effect. There was a Wordpress update. Could this have been the reason? Also, does anyone know how I can check / alter the file that is setting the link url?

Thanks in advance for any help.