Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hackersandslackers/gcloud-image-transformer
πΌπ¨ Optimize images hosted on Google Cloud Storage.
https://github.com/hackersandslackers/gcloud-image-transformer
cdn flask google-cloud-storage pillow python3 retina serverless webp
Last synced: 3 months ago
JSON representation
πΌπ¨ Optimize images hosted on Google Cloud Storage.
- Host: GitHub
- URL: https://github.com/hackersandslackers/gcloud-image-transformer
- Owner: hackersandslackers
- Created: 2019-06-28T13:30:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-27T04:32:06.000Z (4 months ago)
- Last Synced: 2024-10-27T05:29:37.490Z (4 months ago)
- Topics: cdn, flask, google-cloud-storage, pillow, python3, retina, serverless, webp
- Language: Python
- Homepage:
- Size: 102 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Google Cloud Storage Image Transformer





[](https://github.com/hackersandslackers/gcloud_image_transformer/issues)
[](https://github.com/hackersandslackers/gcloud_image_transformer/stargazers)
[](https://github.com/hackersandslackers/gcloud_image_transformer/network)Turn any Google Storage Bucket into a CDN for auto-optimized images. **GCP Image Transformer** ensures that any image added to a GCP bucket has retina, standard definition, webp, and other variants.
## Getting Started
Installation with Pipenv:
```shell
$ git clone https://github.com/hackersandslackers/gcloud_image_transformer.git
$ cd gcloud-image-transformer
$ pipenv shell
$ pipenv update
$ python3 main.py
```Installation via [Poetry](https://python-poetry.org/):
```shell
$ git clone https://github.com/hackersandslackers/gcloud_image_transformer.git
$ cd gcloud-image-transformer
$ poetry install
$ poetry run
```Alternatively, try installing via `setup.py`:
```shell
$ git clone https://github.com/hackersandslackers/gcloud_image_transformer.git
$ cd gcloud-image-transformer
$ python3 setup.py run
```The following environment variables are required to run this script:
* `GCP_BUCKET_URL`: Publicly accessible URL of gcloud bucket.
* `GCP_BUCKET_NAME`: Friendly name of bucket.
* `GOOGLE_APPLICATION_CREDENTIALS`: /path/to/service_key.json
* `GCP_BUCKET_FOLDER_NAME` _(optional)_: /path/to/images