---
title: "svgo 4.1.0 Breaking Changes on npm | Since.dev"
description: "What each svgo release removed, renamed or changed: 180 breaking changes in 19 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/svgo
last_updated: 2026-12-04
---

# svgo breaking changes

svgo 4.1.0 (August 24, 2026) is its newest release with breaking changes, 6 of them. The first: Stricter XML validation rejects invalid numeric character references in svgo 4.1.0. Every breaking API change we have recorded in svgo on npm: 180 breaking changes in 19 versions. Below, its 19 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `4.1.0`, released August 24, 2026. [Source repository](https://github.com/svg/svgo)

Its 4.0.0 release drops [Node.js 14](https://since.dev/calendar/nodejs/14.md). [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [3.3.5](#v-3-3-5) to [4.1.0](#v-4-1-0): 52 breaking changes in 7 versions.
- From [3.0.0](#v-3-0-0) to [4.1.0](#v-4-1-0): 82 breaking changes in 18 versions.

## svgo 4.1.0 breaking changes

svgo 4.1.0, released August 24, 2026: 6 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](https://github.com/svg/svgo/releases/tag/v4.1.0)
- **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](https://github.com/svg/svgo/releases/tag/v4.1.0)
- **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](https://www.npmjs.com/package/svgo/v/4.1.0)
- **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](https://www.npmjs.com/package/svgo/v/4.1.0)
- **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](https://www.npmjs.com/package/svgo/v/4.1.0)
- **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](https://www.npmjs.com/package/svgo/v/4.1.0)

## svgo 4.0.2 breaking changes

svgo 4.0.2, released July 11, 2026: 4 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](https://github.com/svg/svgo/releases/tag/v4.0.2)
- **Signature changed** `BuiltinsWithRequiredParams`  

Was type BuiltinsWithRequiredParams = {addAttributesToSVGElement: AddAttributesToSVGElementParams; addClassesToSVGElement: AddClassesToSVGElementParams; removeAttributesBySelector: any; removeAttrs: RemoveAttrsParams; removeElementsByAttr... [npmjs.com](https://www.npmjs.com/package/svgo/v/4.0.2)
- **Signature changed** `BuiltinsWithRequiredParams.removeAttributesBySelector`  

Was removeAttributesBySelector: any; now removeAttributesBySelector: RemoveAttributesBySelectorParams. [npmjs.com](https://www.npmjs.com/package/svgo/v/4.0.2)
- **Signature changed** `PluginsParams.removeAttributesBySelector`  

Was removeAttributesBySelector: any; now removeAttributesBySelector: RemoveAttributesBySelectorParams. [npmjs.com](https://www.npmjs.com/package/svgo/v/4.0.2)

## svgo 4.0.1 breaking changes

svgo 4.0.1, released March 4, 2026: 6 breaking changes.

- **Removed** `BuiltinPluginOrPreset.description`  

BuiltinPluginOrPreset.description was removed in svgo 4.0.1 [npmjs.com](https://www.npmjs.com/package/svgo/v/4.0.1)
- **Removed** `BuiltinPluginOrPreset.fn`  

BuiltinPluginOrPreset.fn was removed in svgo 4.0.1 [npmjs.com](https://www.npmjs.com/package/svgo/v/4.0.1)
- **Removed** `BuiltinPluginOrPreset.isPreset`  

BuiltinPluginOrPreset.isPreset was removed in svgo 4.0.1 [npmjs.com](https://www.npmjs.com/package/svgo/v/4.0.1)
- **Removed** `BuiltinPluginOrPreset.name`  

BuiltinPluginOrPreset.name was removed in svgo 4.0.1 [npmjs.com](https://www.npmjs.com/package/svgo/v/4.0.1)
- **Removed** `BuiltinPluginOrPreset.plugins`  

BuiltinPluginOrPreset.plugins was removed in svgo 4.0.1 [npmjs.com](https://www.npmjs.com/package/svgo/v/4.0.1)
- **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](https://www.npmjs.com/package/svgo/v/4.0.1)

## svgo 4.0.0 breaking changes

svgo 4.0.0, released June 21, 2025: 19 breaking changes.

- **Removed**  

Node.js v14 is no longer tested or supported by this release. Upgrade to a newer Node.js version. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0)
- **Removed**  

SVGO now requires Node.js 16.0.0 or newer. Make sure your runtime meets this minimum. [github.com](https://github.com/svg/svgo/blob/main/docs/06-migrations/01-migration-from-v3-to-v4.mdx)
- **Removed** `presetDefault`  

Get the preset-default plugin by finding it in builtinPlugins exported from svgo. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0)
- **Removed** `svgo`  

SVGO only has named exports now. Replace default import usage with named imports or import \* as svgo. [svgo.dev](https://svgo.dev/docs/migrations/migration-from-v3-to-v4/)
- **Removed** `svgo.dist.svgo.browser.js`  

Import the browser bundle from svgo/browser instead of the dist file path. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0)
- **Removed** `XastNode.parentNode`  

The legacy parentNode property is gone. Track parent nodes yourself, for example with mapNodesToParents. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0)
- **Renamed** `builtin`  

Import builtinPlugins from svgo instead of the builtin array from svgo/lib/builtin. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0)
- **Renamed** `removeScriptElement`  

Update your SVGO config to use removeScripts instead of removeScriptElement. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0)
- **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](https://github.com/svg/svgo/releases/tag/v4.0.0)
- **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](https://github.com/svg/svgo/releases/tag/v4.0.0)

And 9 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## svgo 4.0.0-rc.2 breaking changes

svgo 4.0.0-rc.2, released June 21, 2025: 5 breaking changes.

- **Removed** `default export`  

Use named exports or import \* as svgo instead of the default import. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0-rc.2)
- **Removed** `XastNode.parentNode`  

Custom plugins must no longer read parentNode; use the new selector helper API. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0-rc.2)
- **Behavior changed** `matches`  

Pass the root node as a third argument, using mapNodesToParents, when selectors reference parent or sibling nodes. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0-rc.2)
- **Behavior changed** `querySelector`  

Pass the root node as a third argument, using mapNodesToParents, when selectors reference parent or sibling nodes. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0-rc.2)
- **Behavior changed** `querySelectorAll`  

Pass the root node as a third argument, using mapNodesToParents, when selectors reference parent or sibling nodes. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0-rc.2)

## svgo 4.0.0-rc.1 breaking changes

svgo 4.0.0-rc.1, released June 21, 2025: 3 breaking changes.

- **Removed** `svgo.lib.types`  

Import XastElement and related types from svgo instead. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0-rc.1)
- **Removed** `svgo.lib.xast.js`  

Import querySelector and querySelectorAll from svgo or svgo/browser instead. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0-rc.1)
- **Removed** `svgo.plugins._collections`  

Import \_collections from svgo instead. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0-rc.1)

## Older versions

13 older versions, each with its first changes. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

### svgo 4.0.0-rc.0 breaking changes

svgo 4.0.0-rc.0, released June 21, 2025: 9 breaking changes.

- **Removed**  

Node.js v14 is no longer tested; upgrade Node.js to keep using SVGO reliably. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0-rc.0)
- **Removed** `svgo.dist.svgo.browser.js`  

Import the browser bundle from svgo/browser instead of the dist file path. [github.com](https://github.com/svg/svgo/releases/tag/v4.0.0-rc.0)

And 7 more in this version.

### svgo 3.3.5 breaking changes

svgo 3.3.5, released August 24, 2026: 1 breaking change.

- **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](https://github.com/svg/svgo/releases/tag/v3.3.5)

### svgo 3.3.4 breaking changes

svgo 3.3.4, released July 11, 2026: 1 breaking change.

- **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](https://github.com/svg/svgo/releases/tag/v3.3.4)

### svgo 3.3.2 breaking changes

svgo 3.3.2, released May 9, 2024: 6 breaking changes.

- **Removed** `browser:CustomPlugin`  

CustomPlugin was removed in svgo 3.3.2 [npmjs.com](https://www.npmjs.com/package/svgo/v/3.3.2)
- **Removed** `browser:optimize`  

optimize was removed in svgo 3.3.2 [npmjs.com](https://www.npmjs.com/package/svgo/v/3.3.2)

And 4 more in this version.

### svgo 3.3.1 breaking changes

svgo 3.3.1, released May 8, 2024: 4 breaking changes.

- **Renamed** `Config`  

Use Config instead. [npmjs.com](https://www.npmjs.com/package/svgo/v/3.3.1)
- **Renamed** `CustomPlugin`  

Use CustomPlugin instead. [npmjs.com](https://www.npmjs.com/package/svgo/v/3.3.1)

And 2 more in this version.

### svgo 3.3.0 breaking changes

svgo 3.3.0, released May 8, 2024: 3 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](https://github.com/svg/svgo/releases/tag/v3.3.0)
- **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](https://www.npmjs.com/package/svgo/v/3.3.0)

And 1 more in this version.

### svgo 3.2.0 breaking changes

svgo 3.2.0, released January 2, 2024: 1 breaking change.

- **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](https://github.com/svg/svgo/releases/tag/v3.2.0)

### svgo 3.1.0 breaking changes

svgo 3.1.0, released December 11, 2023: 1 breaking change.

- **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](https://github.com/svg/svgo/releases/tag/v3.1.0)

### svgo 3.0.5 breaking changes

svgo 3.0.5, released November 30, 2023: 1 breaking change.

- **Signature changed** `loadConfig`  

Was function loadConfig(): Promise\<Config | null>; now function loadConfig(configFile?: null, cwd?: string): Promise\<Config | null>. [npmjs.com](https://www.npmjs.com/package/svgo/v/3.0.5)

### svgo 3.0.4 breaking changes

svgo 3.0.4, released November 18, 2023: 1 breaking change.

- **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](https://github.com/svg/svgo/releases/tag/v3.0.4)

### svgo 3.0.3 breaking changes

svgo 3.0.3, released November 8, 2023: 2 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](https://github.com/svg/svgo/releases/tag/v3.0.3)
- **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](https://github.com/svg/svgo/releases/tag/v3.0.3)

### svgo 3.0.1 breaking changes

svgo 3.0.1, released November 11, 2022: 9 breaking changes.

- **Removed** `BuiltinPluginWithOptionalParams`  

BuiltinPluginWithOptionalParams was removed in svgo 3.0.1 [npmjs.com](https://www.npmjs.com/package/svgo/v/3.0.1)
- **Removed** `BuiltinPluginWithRequiredParams`  

BuiltinPluginWithRequiredParams was removed in svgo 3.0.1 [npmjs.com](https://www.npmjs.com/package/svgo/v/3.0.1)

And 7 more in this version.

### svgo 3.0.0 breaking changes

svgo 3.0.0, released October 23, 2022: 98 breaking changes.

- **Removed** `AddAttributesToSVGElementPlugin`  

AddAttributesToSVGElementPlugin was removed in svgo 3.0.0 [npmjs.com](https://www.npmjs.com/package/svgo/v/3.0.0)
- **Removed** `AddClassesToSVGElementPlugin`  

AddClassesToSVGElementPlugin was removed in svgo 3.0.0 [npmjs.com](https://www.npmjs.com/package/svgo/v/3.0.0)

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](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#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.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
