svgo
4.1.0 · 24 Aug 2026MIT52.3M / weekRepositoryHomepagenpmAtom feed
107 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 1.x
1.0.1
31 Oct 2017Fixed error “Object.defineProperty called on non-object” in images with
<foreignObject/>.
1.0.0
30 Oct 2017- Breaking
SVGO now requires Node 4 or higher.
Changed CLI syntax to treat filenames as input, thus allowing
svgo *.svgsyntax.SVGO.optimize()now returnsPromise.
- Breaking
SVGO now requires Node 4 or higher.
Changed CLI syntax to treat filenames as input, thus allowing
svgo *.svgsyntax.SVGO.optimize()now returnsPromise.Added
dataurioption to JS API.Added support for SVG 2
hrefattribute.cleanupIDsnow don't removes IDs if an image consists only ofdefs.New plugin
inlineStylesfor converting styles from<style>element to attributes if possiblecleanupNumericValuesnow rounds values inviewBoxNew plugin:
removeScriptElement(disabled by default) to align withremoveStyleElementminifyStylesnow removes styles based on usage with controlling optionsNew option
exceptincleanupIDsto keep IDsNew option
forceincleanupIDsto work even if SVG containsstyleorscriptelementsFixed arcs transforming with different signed
scaleparametersFixed
removeUselessStrokeAndFillto check forstyleorscriptelements per fileNew option
keepAriaAttrsinremoveUnknownsAndDefaultsCorrected parsing in
cleanupIDsto account animation syntax#ff0000now converts toredas well as#f00Added “gray” variation to colors list per CSS Color Module Level 4
Fixed error on empty files.
A separator character in
removeAttrsnow can be changed perelemSeparatoroptionaddAttributesToSVGElementnow can add values to attributes.
- 0.7.x
0.7.2
29 Jan 2017Extended
currentColormatch conditions (string, rx, bool)Fixed removing
<animate>in<stop>.Fixed removing same transform in inner element in
removeUnknownsAndDefaults.
Extended
currentColormatch conditions (string, rx, bool)Fixed removing
<animate>in<stop>.Fixed removing same transform in inner element in
removeUnknownsAndDefaults.Fixed collapsing groups with same non-inheritable attribue.
Corrected removing of leading zero in case of exponential notation.
0.7.1
27 Sep 2016Reverted the requirement of Node.js to version 0.10.
Added
addAttributesToSVGElementto the default config to allow using it with--enableoption.Added korean translation of “How it works” doc
0.7.0
25 Aug 2016Required Node.js version has increased to 0.12.
New plugins:
removeElementsByAttr(by IDs or classes)addAttributesToSVGElementremoveXMLNS(for SVG inlining)Tests now correctly pass in Windows with CRLF line endings. Pretty print now accounts system line endings.
Required Node.js version has increased to 0.12.
New plugins:
removeElementsByAttr(by IDs or classes)addAttributesToSVGElementremoveXMLNS(for SVG inlining)Tests now correctly pass in Windows with CRLF line endings. Pretty print now accounts system line endings.
Fixed bugs with collapsing groups with masks and transforms in
collapseGroups.Fixed bugs with erroneous removing IDs in
cleanupIDs.Improved attributes sorting in
sortAttrsaddClassesToSVGElementno more repeats classes
- 0.6.x
0.6.6
25 Apr 2016Corrected CSSO API usage
0.6.5
25 Apr 2016Extra content inserted by editors are now being removed within
<foreignObject>as well thus fixing bug “Namespace prefix … is not defined“ after applying SVGO.Doctype with entities declartion is now also being removed since SVGO correctly parses them starting from the version 0.6.2.
Corrected
moveGroupAttrsToElemsnot to move attributes togcontent if it's referenced (has anid).
Extra content inserted by editors are now being removed within
<foreignObject>as well thus fixing bug “Namespace prefix … is not defined“ after applying SVGO.Doctype with entities declartion is now also being removed since SVGO correctly parses them starting from the version 0.6.2.
Corrected
moveGroupAttrsToElemsnot to move attributes togcontent if it's referenced (has anid).collapseGroupsnow don't collapse a group if it has an animated attribute (SMIL).
0.6.4
5 Apr 2016Fixed bug in “convertStyleToAttrs” plugin with converting styling properties to non-existent attributes (which are normally removed later by
removeUnknownsAndDefaults).Added
--indentoption to style pretty-printed SVG. (e.g.--indent 2)Added
currentColorparam toconvertColorsplugin for converting values likefillandstroketocurrentColor
Fixed bug in “convertStyleToAttrs” plugin with converting styling properties to non-existent attributes (which are normally removed later by
removeUnknownsAndDefaults).Added
--indentoption to style pretty-printed SVG. (e.g.--indent 2)Added
currentColorparam toconvertColorsplugin for converting values likefillandstroketocurrentColorBumped CSSO to the current version and used its new shiny API (thanks to @lahmatiy).
0.6.3
20 Mar 2016Smart rounding (introduced in 0.4.5) now applies only when rounding is needed, thus making subsequent passes more stable.
Fixed regression in converting curves to arcs.
xlink:hrefreferences are now being checked by local namehref, thus correctly working with another namespace prefix.
Smart rounding (introduced in 0.4.5) now applies only when rounding is needed, thus making subsequent passes more stable.
Fixed regression in converting curves to arcs.
xlink:hrefreferences are now being checked by local namehref, thus correctly working with another namespace prefix.Fixed
idremoving with disabledplugins/convertStyleToAttrs.js.
0.6.2
8 Mar 2016Better error handling and messaging improvements.
SVG files with XML entities (e.g. from Adobe Illustrator) are now correctly being parsed.
Fixed error on converting curves to arcs.
Better error handling and messaging improvements.
SVG files with XML entities (e.g. from Adobe Illustrator) are now correctly being parsed.
Fixed error on converting curves to arcs.
Corrected rounding in subsequent passes with
--multipassoption.Data URI option now handles charset
Tranformations are no longer moved to group if there is a mask (
plugins/moveElemsAttrsToGroup.js).Fixed matrix decomposition losing sign in case like
[1, 0, 0, -1, 0, 0](scale(1 -1)).Fixed crash on uppercased color name.
Paths with
idand withoutstroke-widtharen't being trasformed now sincestroke-widthmay be applied later.
0.6.1
21 Nov 2015Added option
--quiteto suppress outputRemoved
lib-covfolder from the package, which was erroneously included before.Fixed errors in “minifyStyles” when there are
<style>elements withCDATAcontent or without content at all.
Added option
--quiteto suppress outputRemoved
lib-covfolder from the package, which was erroneously included before.Fixed errors in “minifyStyles” when there are
<style>elements withCDATAcontent or without content at all.Amended transform functions parsing to prevent errors when there are no separators between numbers (which isn't allowed by syntax, but understood by browsers).
0.6.0
8 Nov 2015New optimization: circular curves are now being converted to arcs. A notable improvement for circles within paths.
New plugin “minifyStyles” which minifies
<style>elments content with CSSONew plugin “removeStyleElement” (disabled by default)
New optimization: circular curves are now being converted to arcs. A notable improvement for circles within paths.
New plugin “minifyStyles” which minifies
<style>elments content with CSSONew plugin “removeStyleElement” (disabled by default)
Fixed issues wuth parsing numbers with exponent fraction (could happen with high precision >= 7).
Fixed rounding error due to incorrect preserving of precision in transformations.
Fixed shortand curve distortion due to converted previous curve to not a curve.
Fixed interoperability issue with
precisioncli-option andfullconfig.Fixed an error produced by “removeUnknownsAndDefaults”
Another Inkscape prefix namespace is being removed.
Fixed an issue in moveElemsAttrsToGroup“” with transforms moved around
clip-path.
- 0.5.x
0.5.6
13 Aug 2015Fixed paths removing.
0.5.5
5 Aug 2015Reverted debugging changes.
0.5.4
5 Aug 2015Reading the note…
0.5.3
21 Jun 2015Reading the note…
0.5.2
24 May 2015Reading the note…
0.5.1
30 Mar 2015Reading the note…
0.5.0
4 Nov 2014Reading the note…
- 0.4.x
0.4.5
2 Aug 2014Reading the note…
0.4.4
14 Jan 2014Reading the note…
0.4.3
2 Jan 2014Reading the note…
0.4.2
19 Dec 2013Reading the note…
0.4.1
18 Nov 2013Reading the note…
0.4.0
18 Nov 2013Reading the note…
- 0.3.x
0.3.7
24 Jun 2013Reading the note…
0.3.6
6 Jun 2013Reading the note…
0.3.5
7 May 2013Reading the note…
0.3.4
6 May 2013Reading the note…
0.3.3
5 May 2013Reading the note…
0.3.2
3 May 2013Reading the note…
0.3.1
15 Apr 2013Reading the note…
0.3.0
12 Apr 2013Reading the note…
- 0.2.x
0.2.4
5 Apr 2013Reading the note…
0.2.3
22 Feb 2013Reading the note…
0.2.2
9 Feb 2013Reading the note…
0.2.1
18 Jan 2013Reading the note…
0.2.0
23 Dec 2012Reading the note…
- 0.1.x
0.1.9
17 Dec 2012Reading the note…
0.1.8
11 Dec 2012Reading the note…
0.1.7
8 Dec 2012Reading the note…
0.1.6
7 Dec 2012Reading the note…
0.1.5
6 Dec 2012Reading the note…
0.1.4
6 Dec 2012Reading the note…
0.1.3
30 Nov 2012Reading the note…
0.1.2
23 Nov 2012Reading the note…
0.1.1
23 Nov 2012Reading the note…
0.1.0
22 Nov 2012Reading the note…
- 0.0.x
0.0.9
28 Oct 2012Reading the note…
0.0.8
20 Oct 2012Reading the note…
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.