How to intercept a "clic"
I'd like to intercept a "left clic" made on an image.
Actually, a clic is openning a new tab in the web browser to dispaly the image file
I'd like to change/modify the code to provide another way to display the image file.
But where ?
You should install Simple Lightbox plugin, go to the plugin settings and configure the lightbox stile. It'll work like it does here at wpForo support forum.
If you need an advanced file attachments features, you should check out wpForo Advanced Attachments addon: https://gvectors.com/product/wpforo-advanced-attachments/