A Google Cloud Storage Source connects to an existing Google Cloud Storage bucket. imgix connects using the credentials you supply, so assets 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 asset 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 asset 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 assets are stored.
- Path Prefix: (optional) The subfolder prefix you want to resolve to (if it exists). The prefix is prepended to the asset path before resolving the asset. By default the asset path is
/
.
Name the Subdomain you'd like to use as the base URL for your assets.
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.
- If you are editing an existing Source and the Video API is enabled, the imgix Video Subdomain field will be visible. This field automatically inherits the value from your imgix Image Subdomain and cannot be modified without changing the Image Subdomain.
-
Set your Asset Processing Rules for the Asset Manager. This setting does not affect which assets can be served through the Rendering API. Instead, it will only impact which assets appear in the Asset Manager based on the path prefix configuration. You can choose to either:
- Include all paths (default setting)
- Include one or many user defined paths
- Exclude all paths
- Exclude one or many user defined paths
Click the Save button. Your Source will be queued for deployment.
Advanced Settings
See the Advanced Source Settings for information about setting up custom domains, defaults, and cache TTL options.