Use a glob pattern to find and resize a set of files with ImageMagick and save them to a new location.
You need to install ImageMagick too.
# Mac
brew install imagemagick
# Ubuntu
sudo apt-get install imagemagick
npm install glob-imagemagick
var resize = require('glob-imagemagick')
var sourceFolder = __dirname + '/images'
var targetFolder = __dirname + '/output'
resize(sourceFolder, ['**/*.png'], targetFolder, '100x100', function(err){
if ( err ) {
console.log(err);
}
})
npm test