Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I send compressed images to Google Cloud Storage? #654

Closed
ghost opened this issue Jan 22, 2019 · 1 comment
Closed

How do I send compressed images to Google Cloud Storage? #654

ghost opened this issue Jan 22, 2019 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented Jan 22, 2019

Hello,

I'm using GCS as cloud storage and want to compress images using gzip.
I read the document, but I could not find how to compress the image for GCS.
Is there a setting to compress images like AWS_IS_GZIPPED for Amazon S3?
What kind of code should I write to compress?

My environment:
macOS 10.14.1, Docker 18.06.1-ce, python 3.7.2, django 2.1.5, django-storages 1.7.1

Thank you.

@ghost ghost changed the title How do I send compressed images to Google CloudPlatform? How do I send compressed images to Google Cloud Storage? Jan 23, 2019
@sww314 sww314 added the google label Apr 3, 2019
@sww314
Copy link
Contributor

sww314 commented Apr 3, 2019

@YuyaNishimaki Did you figure this out?

It seems like you just have to gzip the file, but set the headers correctly.
https://cloud.google.com/storage/docs/transcoding

Right now, you would have to customize the storages to add support for the headers.

mlazowik pushed a commit to qedsoftware/django-storages that referenced this issue Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant