How to link imgix to Cloudflare R2 | Scribe

    How to link imgix to Cloudflare R2

    • 14 steps

    🔐 Create Access Keys for imgix

    1
    Start by navigating to your Cloudflare dashboard, [https://dash.cloudflare.com/](https://dash.cloudflare.com/).
    2
    Locate the "R2" item from the sidebar to navigate to the R2 Overview page.
    3
    Select the "Manage R2 API Tokens" hyperlink in the top-right-hand corner.
    4
    Select the "Create API Token" button.
    5
    Give your API Token keys a descriptive name, appropriate for your use case. We’ll be calling our’s “imgix-example”.
    6
    imgix only requires read permissions to connect to your bucket and begin serving your media. Select the "Admin Read only" option.
    7
    For the TTL section, select the "Forever" option from the dropdown menu.
    8
    Select the "Create API Token" button to generate your set of access keys.
    9
    Your API Token keys will be generated. Be sure to store a copy of your Access Key and Secret Access Key in a secure location.
    alert ordinal icon
    This is the only opportunity you will have to save your Access and Secret Access Keys. Once you leave this page, they can never be re-obtained. Before proceeding onto the next steps, take this moment to store your keys in a secure location for future use.
    10
    Once you have securely stored your credentials, input your Access and Secret Access Keys into the corresponding imgix Source Creation fields.

    🪣 Link your Bucket

    11
    Return to the R2 Overview page to review your buckets.
    12
    Locate the bucket you want to link to imgix, and input its name into the corresponding imgix Source Creation field.

    👤 Link your Endpoint URL

    13
    Copy the Account ID from the R2 Overview page and paste it into the corresponding imgix Endpoint URL field. Append .r2.cloudflarestorage.com to the end to construct the Cloudflare R2 Endpoint URL. eg: [account-id].r2.cloudflarestorage.com

    🎉 Finished!

    14
    Congratulations! You should now have all the credentials needed to connect imgix to your Cloudflare R2 media assets. In the next step of our Source creation process, you’ll create a subdomain for your imgix Source.