code: function writeOptimizedImages(imageData) {
    return Promise.all(
      imageData.map(item =>
        pify(fs.writeFile)(item.path, item.data).then(() => item.path)
      )
    );
  }
docs: Given output from imagemin, write image files.
  
  @param {Array<{ path: string, data: Buffer }>} imageData - imagemin output.
  @return {Promise<Array<string>>} - Resolves with an array of filenames for optimized images that
  have been written.