Ok you are talking about new WF API 2 plugins . Sorry I have never use it so I can’t help. But still is valid that image can’t have children that is why is crashing. IMO this should be dynamically changed by API based on element type.
https://www.w3.org/TR/2011/WD-html5-author-20110809/the-img-element.html