I am trying to use an svg-image on my home-page, basicly using following code:
<html><head/><body>
<img src="images/avatar.svg" width="135mm" height="210mm"/>
</body></html>
Everything goes fine on my pc (Linux with apache-server), however after transfer to a very limiting host, the image is no longer shown. (Note: Tested with Chrome29 and Opera12)
Reason for this: it is transferred under 'text/xml' instead of 'image/svg+xml'
What I am looking for is a way to show this image on my homepage, preferably without loosing the img-tag.
The tricky part about this:
To ease some constraints:
EDIT: Did already contacted support, they claim their host works as it should. So that is why I am looking for solutions (currently using .png, but ain't happy with that)
You can use a data URI (where you specify the content-type yourself), or you can use HTML5 which allows for inline SVG's (which would require you to drop the img tag).
<!doctype html>
<head><title>Red circle</title>
<body>
<img alt="red circle" src="data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'><circle%20fill='red'%20cx='50'%20r='50'%20cy='50'%20/></svg>" />
(even validates)