Image uploaded with wrong extension: html output is blocked before `cropZoom`action call

in page I have uploaded an image with wrong extension (jpg instead of bmp).
In my template I use cropZoomaction: In developer site the result is an image called fallback.jpg. In the production site html output is blocked.

Is there a way to test if a media is consistent and have a correct extension? And above all I don’t understand why html is blocked in production site: it stops before the cropZoomaction call and I haven’t informations in grav.log.