FormatSwap › Formats › SVG
The SVG format
An image that's a small program for drawing itself, and sharp at any size.
- Full name
- Scalable Vector Graphics
- Appeared
- 2001
- File extensions
- .svg
- Our verdict
- Keep it See why
History
Why it was invented
In the web's early years, formats and extensions to HTML multiplied, and “from early on, it was clear that a vector graphic format for the Web would be useful”.[1] The W3C's Chris Lilley wrote up general requirements for web vector graphics in 1996.[1]
By 1998, six competing submissions had reached the W3C. Two of them shaped the result. PGML, from Adobe, IBM, Netscape and Sun, used the same imaging model as PostScript and PDF. VML, from Autodesk, Hewlett-Packard, Macromedia and Microsoft, began in Microsoft's Office group as a PowerPoint add-on.[1][2][3] Their backers disagreed about what the W3C could do with them. Adobe and its partners called PGML just a proposal, while Microsoft said VML documented a product it had already shipped, and that the “W3C was not authorized to make any changes whatsoever”.[1]
What it was first used for
The new SVG Working Group chose not to develop any of the submissions. Instead it designed a new language “informed by, but not really based on” them, taking a compact path syntax from VML, and its coordinate system, transformations and colour spaces from PGML.[1] SVG 1.0 became a W3C Recommendation on 4 September 2001.[4]
Browsers didn't support it natively for some years, so it was first seen through plug-ins such as Adobe's SVG Viewer and toolkits like Apache Batik.[5] Also in 2001, the mobile phone industry chose it as the basis for its graphics platform.[6]
What happened next
SVG 1.1 became a Recommendation on 14 January 2003, the same day as the Tiny and Basic profiles for small devices.[4][5] Opera, Firefox and WebKit browsers later implemented it natively. In 2009, Microsoft announced support in Internet Explorer 9, which the W3C's account describes as bringing SVG “full circle to its origin”.[1] SVG 2 reached Candidate Recommendation on 15 September 2016.[4]
Pros and cons
Pros
- Sharp at any size and resolution.
- Tiny for logos and icons.
- Text-based, so it can be edited and animated.
- Open W3C standard, supported in all browsers.
Cons
- Not suitable for photographs.
- Can contain scripts, a security risk when accepting uploads.
- Complex files can render slowly or differently across programs.
Use cases
- Logos, icons and diagrams.
- Charts on the web.
- Print designs that need to scale.
Pitfalls
- Letting users upload SVG can let them run scripts on your site, so sanitise them.
- Fonts may change on other computers unless text has been converted to outlines.
- An SVG with an embedded photo gets none of vector graphics' scaling benefits.
Should SVG be discontinued?
Keep it
Keep it. For logos, icons and diagrams, no other format comes close: a single small file that looks perfect on any screen, editable as text and backed by an open standard. It's what vector graphics on the web should be.
The security risk is real, but it's a matter of treating it as code rather than as a picture. Fix that with sanitising, not by losing the format.
This verdict is FormatSwap's opinion. “Discontinue” means stop creating new files, not stop reading old ones. How we decide.
SVG files in FormatSwap
PDF Converter opens SVG files and converts them to other formats, but doesn't create new ones.
Related formats
Sources
Numbers in the history above link to these pages. They cover the history section only; the pros, cons and verdict are our own assessment.
- Secret Origin of SVG, W3C SVG Working Group
- Precision Graphics Markup Language (PGML), W3C Note (10 April 1998), W3C
- Vector Markup Language (VML), W3C Note (13 May 1998), W3C
- SVG, Wikipedia
- Scalable Vector Graphics (SVG), Version 1.1, Library of Congress, Sustainability of Digital Formats
- About SVG, W3C