optimize-image

Optimize image files.

Compress image files.

OptimizeImage.prototype.sources(file, context[, options])

Optimize a file.

This implementation inspects the file extension and configures imagemin with the appropriate plugin for the file being processed.

Returns a promise that resolves when the file has been optimized.