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

    9.0.0 • Public • Published

    imagemin-svgo GitHub Actions Status

    SVGO imagemin plugin

    Install

    $ npm install imagemin-svgo
    

    Usage

    const imagemin = require('imagemin');
    const imageminSvgo = require('imagemin-svgo');
    const {extendDefaultPlugins} = require('svgo');
    
    (async () => {
    	await imagemin(['images/*.svg'], {
    		destination: 'build/images',
    		plugins: [
    			imageminSvgo({
    				plugins: extendDefaultPlugins([
    					{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

    Install

    npm i imagemin-svgo

    DownloadsWeekly Downloads

    575,541

    Version

    9.0.0

    License

    MIT

    Unpacked Size

    2.95 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar