Closed Patitotective closed 2 years ago
That is correct no viewBox is what breaks this.
But that is not the only issue with the sonic-lineup-icon.svg
SVG file. SVG can be quite complex... in fact they can contain JS/HTML inside them requiring a full browser to render. We don't plant to support such files. Most programs (unless you are a browser) use some sort of SVG-but-simpler version of SVG where only the common features are supported. This is what we do here.
Your svg file contains a ton of extra inkscape:
parameters and tags.
Your file uses defs
and marker
which appear to be quite complex.
There are tons of other tags I have not seen before.
I don't think we will ever support the file you have sorry. There is just to much "fancy" there.
The vector tool we use - figma export much simpler SVG files. The SVG icons we find online are much simpler as well.
Have you tried using the PlainSVG feature? https://wiki.inkscape.org/wiki/PlainSVG
Have you tried flatting everything to simple paths and shapes?
Have you tried using the PlainSVG feature?
The thing is that I download those SVG files at run-time, so I'd need to install inkscape to convert them to PlainSVG (?) Maybe using another library to simplify them
Hey, I am going to close this, as we can't support every arbitrary SVG files (too complex). But if you have a specific SVG feature that you think is pretty common that we don't support feel free to open an issue on that. Or even better a PR.
I'm creating an application that requires to load images in SVG format. Most of those images are created by Inkscape and it fails loading them. Looking at the source code, I think the problem is that Inkscape's SVG files do not have the
viewBox
attribute.