I've been relying on the usability of the img tag for quite some time but just found out that wgAllowImageTag is now deprecated. Fortunately, the summary that came with the deprecation commit says
it could be reimplemented as an extension tag once it is removed from core
and elsewhere
register an extension tag named <img> instead.
While I'm glad it has not been removed yet, I hoped I could be ahead of trouble by doing just that, trying to add support by way of an extension. My first attempt involved using setHook() and I soon learned about Sanitizer::removeSomeTags(). But then I ran into a known issue, which is that certain void elements like img are not accepted by the parser. The Sanitizer method that checks wgAllowImageTag allows for a restricted list of void elements (see 'htmlsingle', 'htmlsingleonly') but does not accept additions. This also means that the method to be used by callers, removeSomeTags(), does not currently allow for a solution.
I'm not asking you to restore wgAllowImageTag or offer something like it in core functionality. My proposed solution would be to at least provide a way for extensions to implement void elements like img.