Hello and welcome @c0d3m3nt0r
There’s actually been another report of this in Chat: Make Images Clickable / Expandable. There’s a possibility it may be a non-official plugin that’s interfering somehow.
From what we can tell, it’s working as intended in chat here on meta and clicking on an image in chat does enlarge it.
Do you have any special setup/plugins/configuration that may help narrow it down?