svgo
4.1.0 · 24 Aug 2026MIT52.3M / weekRepositoryHomepagenpmAtom feed
Upgrading svgo From 2.8.4 to 3.3.5
14 releases in betweenevery note read
Reading releases, release notes and advisories…
- 8
- changes to make
- 0
- advisories fixed
- 5
- new
- 50
- fixes
Start here
Before you upgrade
Tick each one off as you go- Breaking3.3.2
- Breaking3.3.2
- Breaking3.3.1
- Breaking3.3.0
- Breaking3.0.0
- Breaking3.0.0
- Breaking3.0.0
- Deprecated3.3.0
Security
- 3.3.5
This addresses GHSA-4vpr-x523-8j87 and GHSA-w27v-7q3p-w38r for the v3 release line.
- 3.3.5
This security fix has been backported, but there is no commitment to backport more complex changes in the future.
- 3.3.4
removeScriptElement, remove JavaScript URIs case-insensitively and make
<script>handling namespace aware.
Release by release
- Security
This addresses GHSA-4vpr-x523-8j87 and GHSA-w27v-7q3p-w38r for the v3 release line.
- Security
This security fix has been backported, but there is no commitment to backport more complex changes in the future.
- Fixed
Handle namespace-prefixed SVG anchors and URL schemes containing ASCII tabs or newlines
- Security
- Security
removeScriptElement, remove JavaScript URIs case-insensitively and make
<script>handling namespace aware.
- Security
- Fixed
No longer throws error when encountering comments in DTD.
- Fixed
- Breaking
This effectively made SVGO v3 a breaking change.
- Breaking
We'll then proceed to work on releasing v4 which will document the breaking changes, and feature further breaking changes that were slated for v4, like disabling
removeViewBoxby default.
- Breaking
- Breaking
I apologize for letting that breaking change through, and will aim to do better.
- Breaking
- Breaking
This release introduced breaking changes, which have been reverted in v3.3.2.
- Deprecated
removeDeprecatedAttrs, new plugin that is disabled by default to remove SVG attributes that are deprecated.
- Fixed
cleanupIds, treat both URI encoded and non-URI encoded IDs as the same.
- Fixed
collapseGroups, check styles as well as attributes.
- Breaking
- New
mergePaths, refactor for performance with large files.
- New
convertPathData, refactor
#stringifyPathDatafor performance. - New
- Fixed
convertPathData, fix instances were
qwas incorrectly converted tot. - Fixed
convertTransform, fix for some transforms that weren't being converted correctly.
- New
- Fixed
prefixIds, correctly prefix IDs when
<style>tag contains XML comments. - Fixed
removeHiddenElems, improve handling of definitions (
<defs>), namely when<defs>are defined at the end of the document. - Fixed
cleanupEnableBackground, clean up inline-styles too.
- Fixed
cleanupIds, handle URI encoded references properly.
- Fixed
inlineStyles, no longer crashes on non-inlined selectors with a pseudo-class.
- Fixed
Improve handling of URL references in reference attributes (
url('#a')) across various plugins.
- Fixed
19 other lines we could not sort, mostly version bumps
- 3.3.5
Reject executable
data:URLs and legacyvbscript:URLs - 3.3.5
Sanitize executable HTML inside
<foreignObject>elements - 3.3.0
convertColors, now converts all references to colors excluding references to IDs to lowercase. This can be disabled by setting
convertCasetofalse. - 3.3.0
convertColors, introduce parameter to convert colors to common casing (lowercase/uppercase).
- 3.2.0
convertPathData, improves closing paths and how we determine if to use absolute or relative commands.
- 3.2.0
convertPathData, round arc or convert to lines based on the sagitta, can be disabled by setting
smartArcRoundingtofalse. - 3.2.0
convertPathData, convert cubic Bézier curves to quadratic Bézier curves where possible, can be disabled by setting
convertToQtofalse. - 3.1.0
removeUnknownsAndDefaults, now removes defaults in XML declarations too, enabled by default and can be toggled with
defaultMarkupDeclarations. - 3.0.4
removeXMLNS, no longer removes the XLink (
xmlns:xlink) namespace. If that is desirable, you should enable the new removeXlink plugin, which does more while being safer. - 3.0.4
convertPathData, convert to
zcommand if going back to initial position, or dropzif redundant.
5 internal lines (docs, tests, tooling) left out.
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.