imageutilss3jimp
v1.0.2
Published
Some image functions to crop,resize and quality change with S3
Downloads
4
Maintainers
Readme
Image Utils with S3
Image Util is a NodeJS library for dealing with images.
Has operations like:
- Resize
- Scale
- Grayscale
- Sepia
Installation
npm install
Run
npm run dev
Usage
const imageUtils = require('imageutilss3jimp');
imageUtils.init(
AWS_ACCESS_KEY,
AWS_SECRET_KEY,
AWS_REGION_NAME,
AWS_BUCKET_NAME,
);
await imageUtils.greyConvert({
url: 'url-image.jpg',
});
await imageUtils.resizeImage({
url: 'url-image.jpg',
width: 50,
height: 50,
});
await imageUtils.sepiaConvert({
url: 'url-image.jpg',
});
await imageUtils.scale({
url: 'url-image.jpg',
scaleValue: 3,
});
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.