That's feasible in XHTML, but it don't think it's in the html5 spec.
Instead, you can use a data URL, though you'll be wasting bytes specifying the mime type and base64 encoding the rest.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_...