Optimize Image
Optimize image files
Optimizes image files using imagemin.
Install
yarn add makestatic-optimize-imagemin
API
OptimizeImage
Compress image files.
See Also
.sources
OptimizeImageprototype
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.
file
Object the current file.context
Object the processing context.options
Object options forimagemin
.
Options
jpg
Object options forimagemin-mozjpeg
.png
Object options forimagemin-pngquant
.svg
Object options forimagemin-svgo
.gif
Object options forimagemin-gifsicle
.
License
MIT
Created by mkdoc on March 12, 2017