Our WordPress plugin attempts to get around the issue by doing exactly that on the WordPress end. Inserting two carriage returns before any HTML img
tags before the post is published to Discourse fixes the issue.
I believe that I have suggested adding something similar to our markdown parser here: Markdown rendering issue with image surrounded with HTML. I think the reason for rejecting that approach was because we do not want to deviate from the CommonMark spec.