fis3-optimizer-imagemin
v6.1.2
Published
a image optimizer plugin of fis3 based on imagemin
Downloads
44
Maintainers
Readme
fis3-optimizer-imagemin
a image optimizer plugin of fis3 based on imagemin
packages
all in one
https://www.npmjs.com/package/fis3-optimizer-imagemin
standalone
https://www.npmjs.com/browse/keyword/fis3-optimizer-imagemin
install
npm i -g fis3-optimizer-imagemin
options
var config = {
FILE_EXT: {
PLUGIN_NAME: OPTIONS,
},
}
FILE_EXT:.png, .png8, .jpg, .jpeg, .gif, .svg ...
PLUGIN_NAME: a imagemin supported plugin without prefix image-
OPTIONS: options for current plugin
default options
notice: this might change in future
{
".gif": {
"gifsicle": {
"interlaced": true
}
},
".jpg": {
"mozjpeg": {}
},
".png": {
"upng": {}
},
".svg": {
"svgo": {
"plugins": [
{
"removeViewBox": false
}
]
}
},
".webp": {
"webp": {}
}
}
more options:
usage
// fis-conf.js
const options = {} // your options
fis.match('::image', {
optimizer: fis.plugin('imagemin', options),
})
links
- fis3: http://fis.baidu.com/
- imagemin: https://github.com/imagemin/imagemin
preinstalled imagemin plugins
- [email protected]: https://www.npmjs.com/package/imagemin-upng
- [email protected]: https://www.npmjs.com/package/imagemin-mozjpeg
- [email protected]: https://www.npmjs.com/package/imagemin-gifsicle
- [email protected]: https://www.npmjs.com/package/imagemin-webp
- [email protected]: https://www.npmjs.com/package/imagemin-svgo
license
MIT © fisker Cheung