Skip to content
SVGO plugin for imagemin
JavaScript
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig Meta tweaks Jul 23, 2018
.gitattributes Meta tweaks Jul 23, 2018
.gitignore Meta tweaks Oct 31, 2017
.npmrc Meta tweaks Oct 31, 2017
.travis.yml Use Travis to test on Windows (#36) Feb 20, 2019
index.js Meta tweaks Jul 23, 2018
license Meta tweaks Jul 23, 2018
package.json 7.0.0 Jul 23, 2018
readme.md Use Travis to test on Windows (#36) Feb 20, 2019
test.js Use `new Buffer` until targeting Node.js v6 May 26, 2017

readme.md

imagemin-svgo Build Status

SVGO imagemin plugin

Install

$ npm install imagemin-svgo

Usage

const imagemin = require('imagemin');
const imageminSvgo = require('imagemin-svgo');

(async () => {
	await imagemin(['images/*.svg'], 'build/images', {
		use: [
			imageminSvgo({
				plugins: [
					{removeViewBox: false}
				]
			})
		]
	});

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

API

imageminSvgo([options])(buffer)

Returns a Promise<Buffer>.

options

Type: Object

Pass options to SVGO.

buffer

Type: Buffer

Buffer to optimize.

License

MIT © imagemin

You can’t perform that action at this time.