JSPM

imageutilss3jimp

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q21888F
  • License MIT

Some image functions to crop,resize and quality change with S3

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.

License

MIT