Allow template to use images with relative URL

when a template in injected into the document, we need to resolve any of it's relative image URL.
Supports DOM image as well as SVG image elements