Of course... This is actually a much better solution than introducing a img tag attribute. It would be more visible at the template level and (at least the first example) requires minimal configuration.
Out of curiosity: do you do (or know someone who does) this?
Do you think the functionality is worth the code to implement it?