Skip to content

Kabaril/imagemin-svgo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

118 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SVGO imagemin plugin

Warning

This repo is only for development purposes and not intended to be used in production enviroments.

Usage

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

(async () => {
	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

Buffer to optimize.

License

MIT © imagemin

About

SVGO plugin for imagemin

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%