I am trying to compress images with grunt-contrib-imagemin ~0.9.4
in a node.js
application. My config is:
imagemin: {
dynamic: {
files: [{
expand: true,
cwd: 'server/static/img/',
src: ['**/*.{jpg,gif,png}'],
dest: '_public/incl/img/'
}]
}
},
I systematically get a Error: spawn ENOENT in file somepath/someimage.png
message. It fails at the first processed .png
file. When I don't include .png
files, it all works fine.
I have read somewhere that I should copy the image files first in the target directory as a workaround. I have tried this, but it does not solve the issue.
I am on Windows 7 32-bits and I am using grunt ~0.4.5
. How can I solve this issue?