JSPM

  • Created
  • Published
  • Downloads 606932
  • Score
    100M100P100Q189959F
  • License MIT

SVGO imagemin plugin

Package Exports

  • imagemin-svgo

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (imagemin-svgo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

imagemin-svgo GitHub Actions Status

SVGO imagemin plugin

Install

$ npm install imagemin-svgo

Usage

import imagemin from 'imagemin';
import imageminSvgo from '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