A Microsoft Azure Source connects to an existing Microsoft Azure storage account. imgix connects using the credentials you supply, so images do not have to be public.

Setting Up Your Microsoft Azure Source

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

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

  3. Fill in the details for the Microsoft Azure Source. The parameters are:

    • Storage Account Name: The account name for the storage account containing the images you want imgix to connect to.
    • Storage Account Type: Select File Share or Container (Blob) as appropriate.
    • Bucket Name: The name of your Container or File Share.
    • Prefix: The folder prefix you want to resolve to. The prefix is prepended to the image path before resolving the image in Azure. By default the image path is /.
    • SAS String: A shared access signature (SAS) for the storage account. To generate your SAS string, use the Shared Access Signature Settings page for the storage account. Change the following settings:
      • Allowed Services: Select File or Blob, depending on the service type.
      • Allowed Resource Types: Select only Container and Object.
      • Allowed Permissions: Select only Read and List.
      • Start and Expiry Date/Time: Change the end date to “2029-01-01” or choose a date at least one year in the future.
    • Finally, click Generate SAS and connection string. Below that is a text box labeled “SAS token”. The token begins with “?sv=”. The contents of this text box is your SAS string.
      Screenshot-Azure dashboard
  4. Choose the Subdomain you would like to use as the base URL for your images.

    Note: The subdomain name you choose is unique to your Source and cannot be reused. If you are setting up a Source with a lot of customization (particularly a Custom Domain), choose the name you plan to use going forward.

  5. Click the Save button. Your Source will be queued for deployment. Screenshot-Azure source setup

    Note: By default Azure File Share assets have the Content-Type application/octet-stream, which will cause an image to be downloaded instead of opened directly in the browser when served via imgix without any parameters. To solve this you can add any imgix parameter (such as auto=compress) to the URL or add a default parameter to your Source.

Advanced Settings

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

Next: Serving Images