svgo
4.1.0 · 24 Aug 2026MIT52.3M / weekRepositoryHomepagenpmAtom feed
Upgrading svgo From 0.7.2 to 1.0.0
1 release in betweenevery note read
Reading releases, release notes and advisories…
- 1
- change to make
- 0
- advisories fixed
- 8
- new
- 3
- fixes
Before you upgrade
Tick each one off as you go- Breaking1.0.0
Security
3 advisories still affect 1.0.0
- SVGO removeScripts plugin leaves some executable scripts intacthigh · GHSA-2p49-hgcm-8545
- SVGO: removeScripts incompletely sanitizes executable HTML in SVG foreignObject elementsmoderate · GHSA-4vpr-x523-8j87
- SVGO: removeScripts allows executable links through namespace and control-character bypasseshigh · GHSA-w27v-7q3p-w38r
Upgrading to 2.8.4 clears them.
Release by release
- Breaking
SVGO now requires Node 4 or higher.
- New
Added
dataurioption to JS API. - New
Added support for SVG 2
hrefattribute. - New
New plugin
inlineStylesfor converting styles from<style>element to attributes if possible
- Breaking
9 other lines we could not sort, mostly version bumps
- 1.0.0
Changed CLI syntax to treat filenames as input, thus allowing
svgo *.svgsyntax. - 1.0.0
SVGO.optimize()now returnsPromise. - 1.0.0
cleanupIDsnow don't removes IDs if an image consists only ofdefs. - 1.0.0
cleanupNumericValuesnow rounds values inviewBox - 1.0.0
minifyStylesnow removes styles based on usage with controlling options - 1.0.0
Corrected parsing in
cleanupIDsto account animation syntax - 1.0.0
#ff0000now converts toredas well as#f00 - 1.0.0
A separator character in
removeAttrsnow can be changed perelemSeparatoroption - 1.0.0
addAttributesToSVGElementnow can add values to attributes.
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.