node package manager

wepy-plugin-imagemin

wepy 图片压缩插件

安装

npm install wepy-plugin-imagemin --save-dev

配置wepy.config.js

module.exports.plugins = {
    'imagemin': {
        filter: /\.(jpg|png|jpeg)$/,
        config: {
            'jpg': {
                quality: 80
            },
            'png': {
                quality: 80
            }
        }
    }
};

参数说明

imagemin