svgo breaking changes
Updated December 4, 2026
On this page
Latest version 4.1.0, released August 24, 2026. Source repository
Its 4.0.0 release drops Node.js 14. Node.js end of life dates.
- From 3.3.5 to 4.1.0: 52 breaking changes in 7 versions.
- From 3.0.0 to 4.1.0: 82 breaking changes in 18 versions.
svgo 4.1.0 breaking changes
- Behavior changed
Malformed SVGs with disallowed, surrogate or invalid XML character references are now rejected with a SvgoParserError, though they were previously accepted. Valid XML is unaffected. github.com - Behavior changed
removeScripts
The removeScripts plugin now filters executable data: and vbscript: URLs, sanitizes foreignObject content, and checks namespace-prefixed a elements, so output may differ from before. github.com - Signature changed
browser:optimize
Was function optimize(input: string, config?: import("./types.js").Config | undefined): import("./types.js").Output; now const optimize: (input: string, config?: import('./types.js').Config | undefined) => import('./types.js').Output. npmjs.com - Signature changed
optimize
Was function optimize(input: string, config?: import("./svgo.js").Config | undefined): import("./svgo.js").Output; now const optimize: (input: string, config?: import('./svgo.js').Config | undefined) => import('./svgo.js').Output. npmjs.com - Signature changed
querySelector
Was function querySelector(node: import("./types.js").XastParent, selector: string, parents?: Map<import("./types.js").XastNode, import("./types.js").XastParent> | undefined): import("./types.js").XastChild | null; now const querySelector... npmjs.com - Signature changed
querySelectorAll
Was function querySelectorAll(node: import("./types.js").XastParent, selector: string, parents?: Map<import("./types.js").XastNode, import("./types.js").XastParent> | undefined): import("./types.js").XastChild[]; now const... npmjs.com
svgo 4.0.2 breaking changes
- Behavior changed
removeScripts
The removeScripts plugin now strips JavaScript URIs regardless of letter case and treats script elements in a namespace-aware way, so it may remove more content than before. Check SVG output that relied on the previous matching. github.com - Signature changed
BuiltinsWithRequiredParams
Was type BuiltinsWithRequiredParams = {addAttributesToSVGElement: AddAttributesToSVGElementParams; addClassesToSVGElement: AddClassesToSVGElementParams; removeAttributesBySelector: any; removeAttrs: RemoveAttrsParams; removeElementsByAttr... npmjs.com - Signature changed
BuiltinsWithRequiredParams.removeAttributesBySelector
Was removeAttributesBySelector: any; now removeAttributesBySelector: RemoveAttributesBySelectorParams. npmjs.com - Signature changed
PluginsParams.removeAttributesBySelector
Was removeAttributesBySelector: any; now removeAttributesBySelector: RemoveAttributesBySelectorParams. npmjs.com
svgo 4.0.1 breaking changes
- Removed
BuiltinPluginOrPreset.description
BuiltinPluginOrPreset.description was removed in svgo 4.0.1 npmjs.com - Removed
BuiltinPluginOrPreset.fn
BuiltinPluginOrPreset.fn was removed in svgo 4.0.1 npmjs.com - Removed
BuiltinPluginOrPreset.isPreset
BuiltinPluginOrPreset.isPreset was removed in svgo 4.0.1 npmjs.com - Removed
BuiltinPluginOrPreset.name
BuiltinPluginOrPreset.name was removed in svgo 4.0.1 npmjs.com - Removed
BuiltinPluginOrPreset.plugins
BuiltinPluginOrPreset.plugins was removed in svgo 4.0.1 npmjs.com - Signature changed
BuiltinPluginOrPreset
Was type BuiltinPluginOrPreset<Name extends string, Params> = BuiltinPlugin<Name, Params> & {isPreset?: true; plugins?: ReadonlyArray<BuiltinPlugin<string, Object>>;}; now type BuiltinPluginOrPreset<Name extends string, Params> =... npmjs.com
svgo 4.0.0 breaking changes
- Removed
Node.js v14 is no longer tested or supported by this release. Upgrade to a newer Node.js version. github.com - Removed
SVGO now requires Node.js 16.0.0 or newer. Make sure your runtime meets this minimum. github.com - Removed
presetDefault
Get the preset-default plugin by finding it in builtinPlugins exported from svgo. github.com - Removed
svgo
SVGO only has named exports now. Replace default import usage with named imports or import * as svgo. svgo.dev - Removed
svgo.dist.svgo.browser.js
Import the browser bundle from svgo/browser instead of the dist file path. github.com - Removed
XastNode.parentNode
The legacy parentNode property is gone. Track parent nodes yourself, for example with mapNodesToParents. github.com - Renamed
builtin
Import builtinPlugins from svgo instead of the builtin array from svgo/lib/builtin. github.com - Renamed
removeScriptElement
Update your SVGO config to use removeScripts instead of removeScriptElement. github.com - Behavior changed
matches
Passing a child node now limits context to that node. Pass a rootNode or mapNodesToParents(rootNode) as third argument when selectors reference parents or siblings. github.com - Behavior changed
querySelector
Passing a child node now limits context to that node. Pass a rootNode or mapNodesToParents(rootNode) as third argument when selectors reference parents or siblings. github.com
And 9 more in this version. Sign up to see every change
svgo 4.0.0-rc.2 breaking changes
- Removed
default export
Use named exports or import * as svgo instead of the default import. github.com - Removed
XastNode.parentNode
Custom plugins must no longer read parentNode; use the new selector helper API. github.com - Behavior changed
matches
Pass the root node as a third argument, using mapNodesToParents, when selectors reference parent or sibling nodes. github.com - Behavior changed
querySelector
Pass the root node as a third argument, using mapNodesToParents, when selectors reference parent or sibling nodes. github.com - Behavior changed
querySelectorAll
Pass the root node as a third argument, using mapNodesToParents, when selectors reference parent or sibling nodes. github.com
svgo 4.0.0-rc.1 breaking changes
- Removed
svgo.lib.types
Import XastElement and related types from svgo instead. github.com - Removed
svgo.lib.xast.js
Import querySelector and querySelectorAll from svgo or svgo/browser instead. github.com - Removed
svgo.plugins._collections
Import _collections from svgo instead. github.com
Older versions
13 older versions, each with its first changes. Sign up to see every change
Show 13 older versions
svgo 4.0.0-rc.0 breaking changes
- Removed
Node.js v14 is no longer tested; upgrade Node.js to keep using SVGO reliably. github.com - Removed
svgo.dist.svgo.browser.js
Import the browser bundle from svgo/browser instead of the dist file path. github.com
And 7 more in this version.
svgo 3.3.5 breaking changes
- Behavior changed
removeScriptElement
The removeScriptElement plugin now rejects executable data: and legacy vbscript: URLs, sanitizes executable HTML inside foreignObject, and handles namespace-prefixed anchors, so optimized output may differ from before. github.com
svgo 3.3.4 breaking changes
- Behavior changed
removeScriptElement
The removeScriptElement plugin now removes more script content, including case-variant JavaScript URIs and namespace-aware script elements. Check your optimized output if you relied on the previous behavior. github.com
svgo 3.3.2 breaking changes
- Removed
browser:CustomPlugin
CustomPlugin was removed in svgo 3.3.2 npmjs.com - Removed
browser:optimize
optimize was removed in svgo 3.3.2 npmjs.com
And 4 more in this version.
svgo 3.3.1 breaking changes
And 2 more in this version.
svgo 3.3.0 breaking changes
- Default changed
convertColors
Color references are now converted to lowercase by default. Set convertCase to false to keep the previous casing. github.com - Signature changed
CustomPlugin
Was type CustomPlugin = {name: string; fn: PluginFn<void>;}; now type CustomPlugin<T = any> = {name: string; fn: Plugin<T>; params?: T;}. npmjs.com
And 1 more in this version.
svgo 3.2.0 breaking changes
- Behavior changed
convertPathData
Cubic Bézier curves are converted to quadratic Bézier curves where possible, which changes optimized output. To keep the old output, set convertToQ to false. github.com
svgo 3.1.0 breaking changes
- Default changed
removeUnknownsAndDefaults
The removeUnknownsAndDefaults plugin now also removes default values in XML declarations, and this is enabled by default. To keep the old output, turn it off with the defaultMarkupDeclarations option. github.com
svgo 3.0.5 breaking changes
- Signature changed
loadConfig
Was function loadConfig(): Promise<Config | null>; now function loadConfig(configFile?: null, cwd?: string): Promise<Config | null>. npmjs.com
svgo 3.0.4 breaking changes
- Behavior changed
removeXMLNS
The removeXMLNS plugin no longer removes the xmlns:xlink namespace. To keep that removal, enable the new removeXlink plugin, which is disabled by default. github.com
svgo 3.0.3 breaking changes
- Behavior changed
removeScriptElement
removeScriptElement now strips on* callback attributes and href attributes with javascript: URIs, so output may differ from before. github.com - Default changed
removeDesc
The removeAny parameter of removeDesc now defaults to false for accessibility. Set removeAny to true to keep the previous removal behavior. github.com
svgo 3.0.1 breaking changes
- Removed
BuiltinPluginWithOptionalParams
BuiltinPluginWithOptionalParams was removed in svgo 3.0.1 npmjs.com - Removed
BuiltinPluginWithRequiredParams
BuiltinPluginWithRequiredParams was removed in svgo 3.0.1 npmjs.com
And 7 more in this version.
svgo 3.0.0 breaking changes
- Removed
AddAttributesToSVGElementPlugin
AddAttributesToSVGElementPlugin was removed in svgo 3.0.0 npmjs.com - Removed
AddClassesToSVGElementPlugin
AddClassesToSVGElementPlugin was removed in svgo 3.0.0 npmjs.com
And 96 more in this version.
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.