Package Exports
- imageutilss3jimp
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (imageutilss3jimp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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.