1.0.0 • Published 4 years ago
image-file-optimize v1.0.0
image-file-optimizer
With this Node module you can easily optimize image files,
Installation
- Just include image-file-optimizer before your scripts.
npm install image-file-optimizer
if you’re using node.js.
Usage
const optimizerInstance = new imageOptimizer();
const reqParam = {
s3Path: 'provide your s3 path',
lossy: true,
webp: true,
rename: false,
resize: [
{
id: 'small',
strategy: 'fit',
width: 100,
height: 100
},
{
id: 'medium',
strategy: 'crop',
width: 300,
height: 300
},
{
id: 'large',
strategy: 'square',
size: 400
}
],
files: files
};
const optimizeResponse = await optimizerInstance.optimizationProcess(reqParam);
1.0.0
4 years ago