Displaying an SVG hosted by GoDaddy

I’ve recently been contributing to the TorrentBoy Project and trying to keep some level of activity going for it at all times. The project still needs active contributors, especially if you’re any good with stringing coherent words together or connecting lines together to form pretty pictures. See 1889.ca for more information. Writers? Artists? Anyone!

How is this relevant? I told MCM, the brain behind the project, that I’d get off my butt and finally post the .svg I had created. Being that TorrentBoy is a collaborative project, it helps others if they have a “launching” point to contribute from. From my perspective, I’m hoping that someone can take my image of Crash with Waser Bwaster () and make him awesome.

Back to the point, GoDaddy doesn’t display .svg files by default. When linking to an SVG, the page will just spit out the source code to the image. Not very helpful. A temporary solution would be to change the .svg extension to .xml, which will then correctly display the image. But that’s not how we do it!

The solution is this. Stick the following lines into your websites root .htaccess file (the ~/html directory).

AddType image/svg+xml svg
AddType image/svg+xml svgz
AddEncoding x-gzip .svgz

Give it a try. Much thanks to this article for the solution.

4 Responses to “Displaying an SVG hosted by GoDaddy”

  1. Matthew says:

    Thank you! This helped me tremendously.

  2. […] The hardest part actually had very little to do with SVGs. Apache servers don’t serve SVG files by default, instead of an SVG you get a box full of source code. Luckily I found the solution. […]

  3. Rafael says:

    Thank You!!!!! tring to make this work was hell, lol

Leave a Reply

Staypressed theme by Themocracy