This plugin for the Lasso.js allows the imagemin module to be used to minify GIF, PNG, JPG and SVG images during optimization.
Install the plugin:
npm install lasso-imagemin --save
Enable the plugin:
require('lasso').configure({ plugins: [ { plugin: 'lasso-imagemin', config: { ... // See below for config options } }, ... ] });
This plugins supports the following builtin image minification plugins:
The full list of plugins can found on the following page: imagemin plugins
If you intend to use a non-builtin plugin then you must npm install
it first (e.g. npm install imagemin-webp
).
require('lasso').configure({ plugins: [ { plugin: 'lasso-imagemin', config: { use: [ { paths: ['**/*.gif'], plugin: 'gifsicle', options: { interlaced: true } }, { paths: ['**/*.png'], plugin: 'optipng', options: { optimizationLevel: 3 } }, { // Non-builtin plugins must be referenced by npm module name: paths: ['**/*.webp'], plugin: 'imagemin-webp', // Or: require('imagemin-webp') options: {} } ] } }, ... ] });
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4