Yes, better support for display of images through a modal viewer would be great. I'm not sure a "modal" parameter that has to be explicitly set for files is the best approach - I would recommend optimizing the default experience when a user clicks an image or video. It's not clear that the current behavior based on a pixel threshold is actually desirable as the default behavior. (On a side note, the TMH behavior should be improved to actually play the video immediately, not require a second click to play in modal view.)
Magnus Manske explored an alternative approach pretty extensively in response to the October 2011 Coding Challenge, which is worth taking a look at: https://www.mediawiki.org/wiki/User:Magnus_Manske/wikipic
Cheers, Erik