code: function(callback) {
  
  				// if there’s anything to optimize…
  				if (outputFiles.length > 0) {
  
  					// get absolute paths to the stuff we’re optimizing
  					var outputFilesResolved = outputFiles.map(function(dir) {
  						return path.resolve(__dirname, '../' + dir);
  					});
  
  					// optimize as many times as the user wants
  					async.timesSeries(options.optimize.output.imageOptim, function(i, next) {
  
  						// let the user know that we’re optimizing inputs
  						grunt.log.writeln('Optimizing outputs with ImageOptim (pass ' + (i + 1) + ' of ' + options.optimize.output.imageOptim + ')…');
  
  						// do the optimizations (with promises)
  						optimizeImageOptim(outputFilesResolved, binPath.imageOptim).then(function() {
  							next();
  						});
  
  					}, callback);
  
  				} else {
  					callback(null);
  				}
  
  			}
docs: optimize outputs - ImageOptim