I've been playing around with Inkscape for a while now to create vector image as its one of the easiest solution for Retina-esque site. However I'm having a hard time finding image hosting that support SVG.<p>My question is, why is it so hard for image hosting service to support native SVG, instead of converting an image to other format. Would like to hear the limitations and challenges that comes with it.<p>http://imgur.userecho.com/topic/23630-svg-support/
SVG implementations on browsers have historically been poor, though this is certainly improving. You'll hit many bugs and unsupported features. IE < 9 doesn't support SVG at all, and Safari < 6 only does so in XHTML. SVG fonts are sparsely supported. The alternative - rasterising SVG on the server - is a heavyweight task, I've not found any libraries which can do this quickly.<p>The worst problem may be SVG itself - SVG 1.2 which dates from 2004 was abandoned, and most browsers implement SVG 1.1 which is rather lacking in features. This makes it hard if you're a designer to produce SVG documents which a browser can actually render.<p>At a bare minimum any SVG hosting project would have to involve some sort of SVG lint, to make sure that browser-incompatible SVG elements are not present, implement workarounds for browser-specific bugs, and check that there are no <script> tags etc. The sheer size and complexity of even SVG 1.1 makes it non-trivial. One pragmatic approach to sanitize SVG may be to round-trip SVG -> PDF -> SVG via cairosvg and pdftocairo, though it may burn some CPU.
I'd considered making one some time ago, but gave up when I realised that somebody had already purchased <a href="http://s.vg/" rel="nofollow">http://s.vg/</a>.
XML being XML, it's hard-to-impossible to host SVG without allowing people to store arbitrary XML on your service, which sooner or later is going to be abused.
_Arbitrary_ SVG is a security/privacy problem -- it may inject JS or exploit quirks in rendering to manipulate site contents, import external images and fonts, or simply be a render bomb. And it is hard to filter out those problems.
It's not hard, probably the image hosts concerned merely didn't think to include it.<p>You can upload svg files with the right content type to Amazon S3 without trouble, is that not good enough?
My question is why do you want to host your SVG images elsewhere?<p>If you just want to shop them you could convert them to bitmap or host them on GitHub<p>If you want to include them on your website, they're small and compress well with gzip so why have the complexity of relying on a third party services<p>It you have too much traffic to be able to host them yourself then you should look at something like a CDN e.g. Cloudfront, infront of S3
It's not hard. However, I'd note that IE didn't have built in support until 2011, and the first browser with native svg support was Konqueror in 2004, whereas gif and jpeg have been around for a lot longer.<p>Isn't SVG just XML? I'd assume you could host it that way.