node package manager

improved-image-webpack-loader

improved-image-webpack-loader

Image loader module for webpack

Minify PNG, JPEG, GIF and SVG images with imagemin

gifsicle — Compress GIF images
mozjpeg — Compress JPEG images
optipng — Compress PNG images
svgo — Compress SVG images
pngquant — Compress PNG images

Issues with the output should be reported on the imagemin issue tracker.

Link to npm: https://www.npmjs.com/package/improved-image-webpack-loader

Install

$ npm install image-webpack-loader --save-dev

Usage

Basically the same as https://github.com/tcoopman/image-webpack-loader Look in that repository for more info and guidelines..

Difference: You can now pass an options object for each optimizer:

loader: 'improved-image-webpack-loader',
                query: {
                    gifsicle: {
                        interlaced: true,
                        optimizationLevel: 3,
                        number: 256,
                        ...
                    },
                    mozjpeg: {
                        quality: 60-100,
                        progressive: true,
                        ...
                    },
                    optipng: {
                        optimizationLevel: 7,
                        ...
                    },
                    pngquent: {
                        ...
                    },
                    svgo: {
                        ...
                    }
                }

MIT (http://www.opensource.org/licenses/mit-license.php)