# grunt-svgmin

> Minify SVG

Latest version **7.0.0** (published 2023-01-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install grunt-svgmin
pnpm add grunt-svgmin
yarn add grunt-svgmin
bun add grunt-svgmin
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 7.0.0 |
| Published | 2023-01-24 |
| First published | 2013-04-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14.16 |
| Dependencies | 4 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 432 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | gruntplugin, svg, vector, graphic, image, optimize, minify |

## Links

- npm: https://www.npmjs.com/package/grunt-svgmin
- Repository: https://github.com/sindresorhus/grunt-svgmin
- Homepage: https://github.com/sindresorhus/grunt-svgmin#readme
- Issues: https://github.com/sindresorhus/grunt-svgmin/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/grunt-svgmin

## Dependencies (4)

- [svgo](https://npm.io/package/svgo.md) ^3.0.2
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [log-symbols](https://npm.io/package/log-symbols.md) ^4.1.0
- [pretty-bytes](https://npm.io/package/pretty-bytes.md) ^5.6.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

- 7.0.0 (latest) — 2023-01-24
- 6.0.1 — 2020-07-31
- 6.0.0 — 2019-03-21
- 5.0.0 — 2017-11-24
- 4.0.0 — 2016-09-19
- 3.3.0 — 2016-07-07
- 3.2.0 — 2016-04-08
- 3.1.2 — 2016-01-09
- 3.1.1 — 2016-01-05
- 3.1.0 — 2015-11-14
- 3.0.0 — 2015-11-12
- 2.0.1 — 2015-02-24
- 2.0.0 — 2014-11-10
- 1.0.0 — 2014-09-02
- 0.4.0 — 2014-03-03
- … 5 more at https://npm.io/package/grunt-svgmin/versions

## README

# grunt-svgmin

> Minify SVG using [SVGO](https://github.com/svg/svgo)

*Issues with the output should be reported on the SVGO [issue tracker](https://github.com/svg/svgo/issues).*

## Install

```sh
npm install --save-dev grunt-svgmin
```

## Usage

```js
require('load-grunt-tasks')(grunt);

grunt.initConfig({
	svgmin: {
		options: {
			plugins: [
				{
					name: 'preset-default',
					params: {
						overrides: {
							sortAttrs: false
						}
					}
				}
			]
		},
		dist: {
			files: {
				'dist/unicorn.svg': 'app/unicorn.svg'
			}
		}
	}
});

grunt.registerTask('default', ['svgmin']);
```

### Options

The provided options are passed directly to [SVGO](https://github.com/svg/svgo#configuration).

## Note

Per-file savings are only printed in verbose mode (`grunt svgmin --verbose`).

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