I want to zip images using JSZip and NodeJS but it doesn't work, it works with simple file like .txt ... But with images it doesn't work and I don't know why...
My code :
var newFileName = pathDir + '/' + id + '.jpg';
fs.readFile(newFileName, function(err, data) {
zip.file(id+'.jpg', data, {base64: true});
});