All Projects → prisma-archive → Serverless Image Proxy

prisma-archive / Serverless Image Proxy

Resizes images using a Lambda function (aka Serverless Thumbor)

Programming Languages

typescript
32286 projects

serverless-image-proxy Build Status Greenkeeper badge

Resizes images using a Lambda function (aka Serverless Thumbor)

Note: For this to work in a browser you have to add "/" to binary Media Types in API Gateway console.

Notes

  • Images are cropped before they are resized
  • Cropping starts from left-top corner

Syntax

URL: DOMAIN / VERSION / PROJECT_ID / FILE_SECRET / [ CROP / ] RESIZE [ / NAME ]

Resize

Format: [ X ] x [ Y ]

  • 500x300: Fit into 500px x 300px rectangle
  • 500x300!: Forced resize
  • 500x: Resize to 500px width maintaining aspect ratio
  • x300: Resize to 300px height maintaining aspect ratio

Crop

Format: X x Y : WIDTH x HEIGHT

  • 0x0:400x400: Crops the image taking the first 400x400 square

Name

Name of image to improve indexing of images with search engines.

Supported extensions:

  • png
  • jpg
  • jpeg
  • svg
  • gif
  • bmp
  • webp

Development

Docker required to pre-build native NPM modules (sharp).

Install

npm install --ignore-scripts
npm run prepare
serverless deploy

Contributors

A big thank you to all contributors and supporters of this repository 💚

schickling huvik kbrandwijk

Help & Community Slack Status

Join our Slack community if you run into issues or have questions. We love talking to you!

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].