The images are inside a gallery tag. They are all wrapped in <a> tags and the cursor changes when hovering over it like it is a link. I've noticed that the class="image" on the <a> tag. If I change it to class="internal" using chrome dev tools inspector, it works. I'm not sure where the bug is to fix it though or what I've done to break it. It makes a large part of my wiki unusable to the average user at the moment though.
Topic on Project:Support desk
I should add, this behaviour is broken across a couple themes I've tried. I'm using Vector though.
mediawiki.org also has class="image" on the <a> tag and the images are clickable. Can you mention which MediaWiki version and browsers you're using?
1.34. It doesn't work on Chrome (desktop) or Safari (mobile).
Have you made any modifications in the page MediaWiki:Common.css or other css files?
Which skin are you using?
Vector. No manual changes to files (other than LocalSettings). I'm running in a docker container.
MediaWiki:Common.css is not a file, but a wiki page named MediaWiki:Common.css.
This can also be a problem with MediaWiki:Common.js or another gadget/script, or even an extension (Multimedia Viewer?). For example, a script to make images being enlarged on the same page on click instead of opening the file description page. But maybe a JavaScript error is preventing it from fully functioning and it only prevents the default behavior.
Thanks, Ciencia Al Poder. I stumbled onto the solution based on your comment. I tried searching and viewing MediaWiki:Common.css and got a stack trace from Syntax Highlighter. I updated the SyntaxHighlighter extension and now it works. This seemed bizarre to me - why would a default extension be out of date? This made me realise that my docker set up is flawed; I have /var/www/html mapped to a local directory. I did this so I could easily edit LocalSettings.php as well as install new extensions and skins that would persist. But this means my extensions aren't getting updated when the docker image is! I updated mediaviewer to the latest version and my images are working again. I'll have to fix my docker configuration! Thanks to everyone else that chimed in too!