serverless-image-processing-toolkit

1.0.0 • Public • Published

Serverless Image Processing Toolkit

The Serverless Image Processing Toolkit is a JavaScript package for processing images stored in an AWS S3 bucket using AWS Lambda and the Sharp image processing library.

Installation

npm install serverless-image-processing-toolkit

Usage

const ImageProcessor = require('serverless-image-processing-toolkit');

// Create a new instance of ImageProcessor
const imageProcessor = new ImageProcessor();

// Define a sample S3 event
const event = {
  Records: [
    {
      s3: {
        bucket: {
          name: 'source-bucket'
        },
        object: {
          key: 'example.jpg'
        }
      }
    }
  ]
};

// Process the image
imageProcessor.processImage(event);

Features

  • Resize images to a maximum width of 800 pixels.
  • Automatically handle image uploads and processing using AWS Lambda and S3 event triggers.
  • Easy integration with existing AWS infrastructure.

Configuration

Before using the package, ensure that you have set up the following:

  1. AWS credentials and permissions configured locally or on the execution environment.
  2. Proper permissions set on the source and destination S3 buckets for reading and writing images.

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

License

This project is licensed under the MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i serverless-image-processing-toolkit

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.42 kB

Total Files

3

Last publish

Collaborators

  • nifoleyarc