https://github.com/nullnull/serverless-image-processing
Serverless image processing solution like imgix by Google Cloud Functions
https://github.com/nullnull/serverless-image-processing
Last synced: about 1 year ago
JSON representation
Serverless image processing solution like imgix by Google Cloud Functions
- Host: GitHub
- URL: https://github.com/nullnull/serverless-image-processing
- Owner: nullnull
- Created: 2020-04-04T13:13:18.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T09:31:20.000Z (over 3 years ago)
- Last Synced: 2025-03-23T23:37:06.474Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 793 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# serverless-image-processing
Serverless image processing solution like [imgix](https://www.imgix.com/) by Google Cloud Functions.
You can resize and composite image by simple URL parameters.
## Overview
XXX: All urls are dummy.
**resize**
https://your.cloudfunctions.net/convertImage/path/to/image.png?w=1200&h=800
**composite**
https://your.cloudfunctions.net/convertImage/path/to/image.png?mark=https://yourdomain.com/image/credit.png&mark-gravity=southwest
**with secure token(MD5)**
https://your.cloudfunctions.net/convertImage/path/to/image.png?w=1200&s=900150983cd24fb0d6963f7d28e17f72
## How to use
```sh
$ git clone https://github.com/nullnull/serverless-image-processing
# edit src/config.ts to update SOURCE_URL
$ vi src/index.ts
# deploy to your cloud functions
$ yarn run deploy
```
## Development
```sh
# compile typescript
$ yarn run watch
# start local server
$ yarn run dev
# curl http://localhost:8080/convertImage/path/to/image.png?w=1200&h=800
```