I’m curious: could you explain why it’s handy?
In XWiki, page content is parsed as a DOM of elements (we call it a XDOM) and when rendering an XDOM to a syntax (XHTML in this case), we generate events, and we have Listener or Renderer (a Renderer is a Listener) to decide what to generate for each element (paragraph, images, etc).
The XHTML renderer is itself using some ancillary components to perform its rendering, one of them is the XHTMLImageRenderer (xwiki-rendering/xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/image/XHTMLImageRenderer.java at 9e4974d280f409b3ad216a6dba48b3328cbb5788 · xwiki/xwiki-rendering · GitHub).
So you can override this with your component, see https://extensions.xwiki.org/xwiki/bin/view/Extension/Component%20Module#HOverrides
Thanks