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.
Installation with Pipenv:
$ git clone https://github.com/hackersandslackers/gcloud_image_transformer.git
$ cd gcloud-image-transformer
$ pipenv shell
$ pipenv update
$ python3 main.py
Installation via Poetry:
$ git clone https://github.com/hackersandslackers/gcloud_image_transformer.git
$ cd gcloud-image-transformer
$ poetry install
$ poetry run
Alternatively, try installing via setup.py
:
$ 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.jsonGCP_BUCKET_FOLDER_NAME
(optional): /path/to/images