imagemin-svgo
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/imagemin-svgo package

11.0.1 • Public • Published

imagemin-svgo GitHub Actions Status

SVGO imagemin plugin

Install

npm install imagemin-svgo

Usage

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.

buffer

Type: Buffer

The buffer to optimize.

Package Sidebar

Install

npm i imagemin-svgo

Weekly Downloads

221,531

Version

11.0.1

License

MIT

Unpacked Size

2.91 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus