|
|
|
Ask HN:Whats the problem with SVG?
|
|
23 points
by lousy_sysadmin
4887 days ago
|
|
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/ |
|
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.
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.