SVGO imagemin plugin
This repo is only for development purposes and not intended to be used in production enviroments.
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');
})();
Returns a Promise<Buffer>
.
Type: Object
Pass options to SVGO.
Type: Buffer
Buffer to optimize.
MIT © imagemin