All Projects → Mercateo → Serverless Image Processor

Mercateo / Serverless Image Processor

Licence: apache-2.0
AWS Lambda image processor

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Serverless Image Processor

Retinal
🏙 Retinal is a Serverless AWS Lambda service for resizing images on-demand or event-triggered
Stars: ✭ 208 (+96.23%)
Mutual labels:  aws, aws-lambda, aws-s3, image-processing
Serverless Docker Image Resize
Simple serverless image resize on-the-fly - Deploy with one command - Built with AWS Lambda and S3
Stars: ✭ 114 (+7.55%)
Mutual labels:  aws, aws-lambda, aws-s3, image-processing
Ssm Cache Python
AWS System Manager Parameter Store caching client for Python
Stars: ✭ 177 (+66.98%)
Mutual labels:  aws, aws-lambda, aws-s3
Node S3 Uploader
Flexible and efficient resize, rename, and upload images to Amazon S3 disk storage. Uses the official AWS Node SDK for transfer, and ImageMagick for image processing. Support for multiple image versions targets.
Stars: ✭ 237 (+123.58%)
Mutual labels:  aws, aws-s3, image-processing
Amazon Rekognition Video Analyzer
A working prototype for capturing frames off of a live MJPEG video stream, identifying objects in near real-time using deep learning, and triggering actions based on an objects watch list.
Stars: ✭ 309 (+191.51%)
Mutual labels:  aws, aws-lambda, image
Awsmobile Cli
CLI experience for Frontend developers in the JavaScript ecosystem.
Stars: ✭ 147 (+38.68%)
Mutual labels:  aws, aws-lambda, aws-s3
Github link creator
GitHub Link Card Creator lets you generate GitHub images has links to repositories.
Stars: ✭ 149 (+40.57%)
Mutual labels:  aws, image-processing, image
Nuxt Serverless
Nuxt.js Serverless SSR Starter on AWS (Lambda + API Gateway + S3) with Serverless Framework
Stars: ✭ 235 (+121.7%)
Mutual labels:  aws, aws-lambda, aws-s3
Aws Lambda Image
Automatic image resize/reduce on AWS Lambda
Stars: ✭ 790 (+645.28%)
Mutual labels:  aws, aws-lambda, image
Aws Lambda Resize Images
AWS Lambda function to generate a set of resized images (large, medium, small)
Stars: ✭ 6 (-94.34%)
Mutual labels:  aws, aws-lambda, image-processing
Touchdown
Cloud service orchestration framework for python
Stars: ✭ 10 (-90.57%)
Mutual labels:  aws, aws-lambda, aws-s3
Shadowreader
Serverless load testing for replaying website traffic. Powered by AWS Lambda.
Stars: ✭ 138 (+30.19%)
Mutual labels:  aws, aws-lambda, aws-s3
Aws Github Actions
Deploy 🚀 to AWS ☁️ with GitHub Actions!
Stars: ✭ 70 (-33.96%)
Mutual labels:  aws, aws-lambda, aws-s3
0x4447 product s3 email
📫 A serverless email server on AWS using S3 and SES
Stars: ✭ 2,905 (+2640.57%)
Mutual labels:  aws, aws-lambda, aws-s3
Tachyon
Faster than light image resizing service that runs on AWS. Super simple to set up, highly available and very performant.
Stars: ✭ 177 (+66.98%)
Mutual labels:  aws-lambda, aws-s3, image-processing
Serverless Photo Recognition
A collection of 3 lambda functions that are invoked by Amazon S3 or Amazon API Gateway to analyze uploaded images with Amazon Rekognition and save picture labels to ElasticSearch (written in Kotlin)
Stars: ✭ 345 (+225.47%)
Mutual labels:  aws, aws-lambda, aws-s3
Curso Aws Com Terraform
🎦 🇧🇷 Arquivos do curso "DevOps: AWS com Terraform Automatizando sua infraestrutura" publicado na Udemy. Você pode me ajudar comprando o curso utilizando o link abaixo.
Stars: ✭ 62 (-41.51%)
Mutual labels:  aws, aws-lambda, aws-s3
Smart Security Camera
A Pi Zero and Motion based webcamera that forwards images to Amazon Web Services for Image Processing
Stars: ✭ 103 (-2.83%)
Mutual labels:  aws, aws-lambda, aws-s3
Lambda Monitoring
Logging and metrics libraries for AWS Lambda
Stars: ✭ 85 (-19.81%)
Mutual labels:  aws, aws-lambda
Simpleupload
Simple upload system in PHP, compatible with AWS S3, Dropbox, Azure and others.
Stars: ✭ 85 (-19.81%)
Mutual labels:  aws, aws-s3

serverless-image-processor

Build Status Coverage Status Greenkeeper badge code style: prettier Maintainability License

This is a Serverless starter for an image processing lambda. It will create a Cloudfront Distribution, an API Gateway, a image source Bucket and a Lambda function. It's based on the phenomenal sharp image manipulation and conversion library.

Request flow is:
User -> Cloudfront -> API Gateway -> Lambda

Demo

test.png test.jpg test.gif
https://d1tk3y1sqx2xzp.cloudfront.net/test.png?width=200
https://d1tk3y1sqx2xzp.cloudfront.net/test.jpg?width=200
https://d1tk3y1sqx2xzp.cloudfront.net/test.gif?width=200

Supported formats

Input: image/jpeg, image/png, image/gif
Output: image/jpeg, image/png, image/webp

Query params

export interface QueryParams {
  /**
   * The width/height of the output image.
   * If you specify only one dimension (width or height) the image will be scaled respecting the ratio.
   * If you specify both the image will be croped to the center if possible.
   * If nothing is specified the width will default to 1920.
   * Allowed values: 1 - 5000
   */
  width?: number;
  height?: number;

  /**
   * Do not enlarge the output image if the input image width or height are already less than the required dimensions. 
   * Default: true
   */
  withoutEnlargement?: boolean;

  /**
   * Preserving aspect ratio, resize the image to the maximum width or height specified then embed on a background of the exact width and height specified.
   * Default: false
   */
  embed?: boolean;

  /**
   * Sets the background for embed mode.
   * Accepts every string format which is accepted by https://www.npmjs.com/package/color.
   * Default: black
   */
  background?: string;

  /**
   * Preserving aspect ratio, resize the image to be as large as possible while ensuring its dimensions are less than or equal to the width and height specified.
   * Both width and height must be provided via resize otherwise the behaviour will default to crop.
   * Default: false
   */
  max?: boolean;

  /**
   * Converts the input image to jpg.
   * Default: false
   */
  jpg?: boolean;

  /**
   * Converts the input image to webp.
   * Default: false
   */
  webp?: boolean;

  /**
   * Specifies the output quality for jpg and webp.
   * Allowed values: 1 - 100
   * Default: 75
   */
  quality?: number;

  /**
   * Specifies if the output is a progressive image.
   * Only for jpg and png output.
   * Default: true
   */
  progressive?: boolean;

  /**
   * Blur the image.
   * Needs a value between 0.3 and 100 representing the sigma of the Gaussian mask, where sigma = 1 + radius / 2.
   * Keep in mind higher values will be very slow.
   */
  blur?: number;

  /**
   * If true the output image will be normalized to enhance
   * contrast by stretching its luminance to cover the full dynamic range.
   * Default: false
   */
  normalize?: boolean;
}

Deployment

If you want to deploy this project to AWS please have a look at this documentation https://serverless.com/framework/docs/providers/aws/guide/quick-start/
It should give you a very good starting point.

Local development

  1. $ yarn
  2. $ yarn start

That's it! :)

The start command will spin up an offline version of an API Gateway and a local S3 server (via serverless-offline). After this you can query some test images (test.gif, test.jpg and test.png) via http://localhost:3000.

Contributing

Please feel free to open issues or create PRs. :)
Just run the test suites (yarn test and yarn test:e2e) and create new tests for added features. Also make sure you run yarn lint (and yarn lint:fix) to check for code style issues. Notice: the end to end tests may fail on your setup. I work on this :/

A note on updating sharp

sharp is fixed at version 0.20.1. If you plan to upgrade please follow this guide and place the output in the compiled/ folder.

Credits

Example photos by Adi Constantin, Michael DePetris, Blake Connally on Unsplash

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].