Image-min 运行正常,但我得到 0 张图片缩小了,为什么?
在我的终端上运行代码后:
$ grunt imagemin
Running "imagemin:dist" (imagemin) task
Minified 0 images (saved 0 B)
Done, without errors.
我不明白,我尝试加载不同的图像但仍然没有压缩。
imagemin 部分在我的咕噜声中:
//Image min ===============================
var imagemin;
config.imagemin = imagemin = {};
imagemin.dist = {
options: {
optimizationLevel: 5,
progressive: true,
},
dynamic: {
files: [{
expand: true,
cwd: 'assets/images',
src: ['**/*.{png,jpg,gif}'],
dest: 'public/images'
}]
}
};