https://github.com/k-yomo/cloud_function_thumbnails_generator
https://github.com/k-yomo/cloud_function_thumbnails_generator
cloudfunction thumbnail
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/k-yomo/cloud_function_thumbnails_generator
- Owner: k-yomo
- License: mit
- Created: 2019-05-28T14:19:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T22:33:21.000Z (almost 3 years ago)
- Last Synced: 2025-01-17T04:33:31.769Z (about 1 year ago)
- Topics: cloudfunction, thumbnail
- Language: Go
- Size: 4.38 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloud Function Thumbnails Generator

[](https://goreportcard.com/report/k-yomo/cloud_function_thumbnails_generator)
- `GenerateThumbnails` function will generate 100x100, 500x500, 1000x1000 thumbnails triggered by uploading image to the target bucket.
- `DeleteThumbnails` function will delete generated thumbnails when original image gets deleted.
## Deploy
- `GenerateThumbnails`
```
cd functions/generate_thumbnails
gcloud functions deploy GenerateThumbnails --runtime go111 --trigger-resource BUCKET_NAME --trigger-event google.storage.object.finalize
```
- `DeleteThumbnails`
```
cd functions/delete_thumbnails
gcloud functions deploy DeleteThumbnails --runtime go111 --trigger-resource BUCKET_NAME --trigger-event google.storage.object.delete
```
## Example
### Uploaded Image

### Generated Thumbnails
- 1000x1000

- 500x500

- 100x100
