How to use imagemin-svgo - 3 common examples

To help you get started, we’ve selected a few imagemin-svgo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TrigenSoftware / gulp-srcset / src / generator.js View on Github external
jpg: {
			quality: 100
		},
		png: {}
	};

	optimization = {
		webp: webpPlugin({
			quality: 100
		}),
		jpg:  mozJpegPlugin({
			quality: 100
		}),
		png:  zopfliPlugin(),
		gif:  gifLossyPlugin(),
		svg:  svgoPlugin()
	};

	postfix = (width, mul) => (mul === 1 ? '' : `@${width}w`);

	skipOptimization = false;

	constructor(config = {}) {

		if (typeof config == 'object') {

			const { processing, optimization, postfix, skipOptimization } = config;

			Object.assign(this.processing, processing);
			Object.assign(this.optimization, optimization);

			if (typeof postfix == 'function') {
github DanWebb / jdown / src / transform-assets.ts View on Github external
const assets = paths.map(async assetPath => {
    const asset = await imagemin([assetPath], '', {
      plugins: [
        imageminPngquant(options.png),
        imageminJpegtran(options.jpg),
        imageminGifsicle(options.gif),
        imageminSvgo(options.svg)
      ]
    });
    asset[0].path = assetPath;
    return asset[0];
  });
github douglasjunior / emage / app / utils / Process.js View on Github external
const engineSvg = algorithm => {
    switch (algorithm) {
        case 'svgo':
            return imageminSvgo();
        default:
            return null;
    }
};

imagemin-svgo

SVGO imagemin plugin

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis

Popular imagemin-svgo functions