A Google Cloud Storage Source connects to an existing Google Cloud Storage bucket. imgix connects using the credentials you supply, so images don’t have to be public. You will need to turn on Interoperability for your Google Cloud Storage project and create an access key/secret pair to use with imgix.
Google Cloud Storage applies
Cache-Control: no-store, no-cache, max-age=0, must-revalidate headers in the absence of a
Cache-Control header on your image files, disabling any possibility of caching. Because of this, imgix defaults the Cache TTL Behavior mode in Advanced Source Settings for all new Google Cloud Storage Sources to “Enforce minimum”, which applies
max-age=1yr, public to all files whether they have a header or not. This is to ensure that caching works on all files.
If you have already set
Cache-Control headers on your image files, you should change the Cache TTL Behavior setting to “Respect origin” when you set up your Source. If you have not set headers, we recommend leaving it set to “Enforce minimum”.
Setting Up Your Google Cloud Storage Source
To create the access key and secret, go to the Settings page in your console and click the Interoperability tab.
Choose the project you want to connect to imgix from the dropdown.
Under “Interoperable storage access keys”, click Create a new key.
Go to the Sources page in the imgix dashboard and click the New Source button.
Select Google Cloud Storage from the Source Type dropdown.
Fill in the details of your Google Cloud Storage project. The parameters are:
- Access Key: The Interoperable access key for your project.
- Secret Key: The secret for your project.
- Bucket Name: The name of the bucket within the project where your images are stored.
- Path Prefix: (optional) The subfolder prefix you want to resolve to (if it exists). The prefix is prepended to the image path before resolving the image. By default the image path is
Name the Subdomain you’d like to use as the base URL for your images.
Note: The subdomain name you choose is unique to your Source and can’t be re-used. If you’re setting up a Source with a lot of customization (particularly a Custom Domain), choose the name you plan to use going forward.
Click the Save button. Your Source will be queued for deployment.
See the Advanced Source Settings for information about setting up custom domains, defaults, and cache TTL options.