svgo
4.1.0 · 24 Aug 2026MIT52.3M / weekRepositoryHomepagenpmAtom feed
1.3.2 is the newest release of 1.x.
In short
5 new14 fixed4 changed
Security
3 advisories affect 1.1.0; 2.8.4 fixes them
- HighSVGO: removeScripts allows executable links through namespace and control-character bypassesGHSA-w27v-7q3p-w38r · 8 Sep 2026Fixed in 2.8.4
- HighSVGO removeScripts plugin leaves some executable scripts intactGHSA-2p49-hgcm-8545 · 21 Jul 2026Fixed in 2.8.3
- ModerateSVGO: removeScripts incompletely sanitizes executable HTML in SVG foreignObject elementsGHSA-4vpr-x523-8j87 · 8 Sep 2026Fixed in 2.8.4
Release note
Fixed
collapseGroupsplugin removing property with a child havinginheritvalue.versionattribute value is not more being rounded.Fixed jsAPI
clonemethod with respect to the introduced CSS classes.Fixed scaling strokes with
vector-effect="non-scaling-stroke"Fixed passing properties from groups in
collapseGroupsplugin if child have a filterFixed arc path commands parsing without separators after flags, effectively producing a JS error.
Fixed
viewBoxseparators parsing.Fixed
removeNonInheritableGroupAttrsplugin to work as intended.Fixed removing path segments without length in presence of
stroke-linecap.Fixed
removeUnknownsAndDefaultsplugin removing attributes from elements withid.Fixed converting to large arcs from nearly straight lines curves.
Fixed
collapseGroupsplugin affecting<switch>and its subgroups.Fixed
convertTransformplugin converting torotate()with wrong sign in some case.Fixed
cleanupListOfValuesplugin not preserving non-numeric values.Fixed
!importantbeing passed to attributes inconvertStyleToAttrsplugin.Added option
keepImportanttoconvertStyleToAttrsplugin to preserve styles with!important.removeHiddenElemsplugin now also removes elements withvisibility="hidden"attributeAdded
forceAbsolutePathoption toconvertPathDataplugin to always use absolute coordinatesAdded
keepRoleAttrforremoveUnknownsAndDefaultsplugin to preserverole-attributesAdded
xmlnsorder option insortAttrspluginAdded an option to
prefixIdsplugin to pass prefix as false or as a function that returns falseprefixIdsplugin now adds prefix to every classUpdated and improved docs a bit (multiple authors).
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.