An DigitalOcean Source connects to an existing DigitalOcean Space. imgix connects using the credentials you supply, so your DigitalOcean assets don't have to be public.

Setting Up Your DigitalOcean Source

  1. Go to the Sources page in the imgix dashboard and click the New Source button.

  2. Select DigitalOcean from the Source Type dropdown. Screenshot-DigitalOcean source setup

  3. Fill in the details for the DigitalOcean Source (see the security notice below about access/secret keys). The parameters are:

    • Access Key ID: The DigitalOcean access key of the credentials you want imgix to connect with.
    • Secret Access Key: The DigitalOcean secret key of the credentials you want imgix to connect with.
    • Bucket: The name of the DigitalOcean Space containing the assets you want imgix to connect to.
    • Endpoint URL: The S3 endpoint URL used by your DigitalOcean Space.
    • Region: The region of your DigitalOcean Space
    • Prefix: The folder prefix you want to resolve to. The prefix is prepended to the asset path before resolving the asset in DigitalOcean. By default the asset path is /.
  4. 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.

  5. 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
  6. Click the Save button. Your Source will be queued for deployment. Screenshot-DigitalOcean source setup

Security

We strongly recommend creating DigitalOcean access keys specifically for imgix to access your Space with. All DigitalOcean credentials are stored using industry standard cryptographic best practices.

Advanced

Configuring CORS for uploading

To allow uploading assets directly into your DigitalOcean Spaces using the imgix Asset Manager, you must allow the PUT method and the Content-Type header from https://dashboard.imgix.com in your Space's CORS configuration.

Refer to the DigitalOcean documentation for instructions on how to configure CORS. Here is a screenshot example of how your configuration should look like.

Screenshot - Adding CORS to DigitalOcean Spaces.

Advanced Settings

See the Advanced Source Settings for information about setting up custom domains, defaults, and cache TTL options.


Next: Serving Assets