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.
- Images are cropped before they are resized
- Cropping starts from left-top corner
URL:
DOMAIN
/VERSION
/PROJECT_ID
/FILE_SECRET
/ [CROP
/ ]RESIZE
[ /NAME
]
Format: [
X
] x [Y
]
500x300
: Fit into 500px x 300px rectangle500x300!
: Forced resize500x
: Resize to 500px width maintaining aspect ratiox300
: Resize to 300px height maintaining aspect ratio
Format:
X
xY
:WIDTH
xHEIGHT
0x0:400x400
: Crops the image taking the first 400x400 square
Name of image to improve indexing of images with search engines.
Supported extensions:
- png
- jpg
- jpeg
- svg
- gif
- bmp
- webp
Docker required to pre-build native NPM modules (sharp).
npm install --ignore-scripts
npm run prepare
serverless deploy
A big thank you to all contributors and supporters of this repository 💚
Join our Slack community if you run into issues or have questions. We love talking to you!