# imagemin-svgo

> SVGO imagemin plugin

Latest version **12.0.0** (published 2026-02-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install imagemin-svgo
pnpm add imagemin-svgo
yarn add imagemin-svgo
bun add imagemin-svgo
```

## Health

**Score 58/100 (C)** — status: stable.

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 12.0.0 |
| Published | 2026-02-24 |
| First published | 2014-04-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/imagemin-svgo) |
| Module format | ESM |
| Node | >=20 |
| Dependencies | 2 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 127 |
| Maintainers | sindresorhus |
| Keywords | compress, image, imageminplugin, minify, optimize, svg, svgo |

## Links

- npm: https://www.npmjs.com/package/imagemin-svgo
- Repository: https://github.com/imagemin/imagemin-svgo
- Homepage: https://github.com/imagemin/imagemin-svgo#readme
- Issues: https://github.com/imagemin/imagemin-svgo/issues
- npm.io page: https://npm.io/package/imagemin-svgo

## Dependencies (2)

- [svgo](https://npm.io/package/svgo.md) ^4.0.0
- [is-svg](https://npm.io/package/is-svg.md) ^6.1.0

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 12.0.0 (latest) — 2026-02-24
- 11.0.1 — 2024-06-15
- 11.0.0 — 2024-05-05
- 10.0.1 — 2021-12-17
- 10.0.0 — 2021-09-12
- 9.0.0 — 2021-03-02
- 8.0.0 — 2020-05-24
- 7.1.0 — 2020-02-19
- 7.0.0 — 2018-07-23
- 6.0.0 — 2017-11-01
- 5.2.4 — 2017-11-01
- 5.2.3 — 2017-10-31
- 5.2.2 — 2017-05-26
- 5.2.1 — 2017-03-24
- 5.2.0 — 2016-08-26
- … 22 more at https://npm.io/package/imagemin-svgo/versions

## README

# imagemin-svgo ![GitHub Actions Status](https://github.com/imagemin/imagemin-svgo/workflows/test/badge.svg?branch=main)

> [SVGO](https://github.com/svg/svgo) imagemin plugin

## Install

```sh
npm install imagemin-svgo
```

## Usage

```js
import imagemin from 'imagemin';
import imageminSvgo from 'imagemin-svgo';

await imagemin(['images/*.svg'], {
	destination: 'build/images',
	plugins: [
		imageminSvgo({
			plugins: [{
				name: 'removeViewBox',
				active: false
			}]
		})
	]
});

console.log('Images optimized');
```

## API

### imageminSvgo(options?)(buffer)

Returns a `Promise<Buffer>`.

#### options

Type: `object`

Pass options to [SVGO](https://github.com/svg/svgo#configuration).

#### buffer

Type: `Buffer`

The buffer to optimize.

---
_Source: https://npm.io/package/imagemin-svgo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
