Live data from Hacker News

Ask HN:Whats the problem with SVG?

news.ycombinator.com

1–10 of 27 posts

Ask HN:Whats the problem with SVG?

#1
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.

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.

http://imgur.userecho.com/topic/23630-svg-support/

Re: Ask HN:Whats the problem with SVG?

#2
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.

Isn't SVG just XML? I'd assume you could host it that way.

Re: Ask HN:Whats the problem with SVG?

#3
post #2

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. Isn't SVG just XML? I'd assume you could host it that way.

It's XML based, really only uses a different schema.

Re: Ask HN:Whats the problem with SVG?

#8
It's not hard, probably the image hosts concerned merely didn't think to include it.

You can upload svg files with the right content type to Amazon S3 without trouble, is that not good enough?

Re: Ask HN:Whats the problem with SVG?

#9
_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.

Re: Ask HN:Whats the problem with SVG?

#10
post #9

_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.

You could just have a dedicated domain for it, then there's no risk of XSS. It's doable, but it would be rather fragile.

The render bomb point is a little trickier, as you can use some detailed filters to crash most browsers. Heck, even a single simple shape will crash any version of iOS.

Post reply on HN