Adding WebP support to Azure App Services

If your getting a 404 not found error when requesting .webp files when using Azure App Services and your sure the files exist you likely need to add the WebP mime type.

You can do this by adding a Web.Config file (if one doesn’t already exist) to your wwwroot folder which contains a mapping from the webp extension to the image/webp mime type. For example..

<?xml version="1.0" encoding="UTF-8"?>
      <mimeMap fileExtension="webp" mimeType="image/webp" />

Enabling Azure CDN to read Azure Storage account blobs to resolve ‘The specified resource does not exist’ error

If you’ve got an Azure CDN endpoint hooked into an Azure Storage account you may get an error stating ‘The specified resource does not exist‘ when you try to access a file through the CDN URL endpoint.

If your sure the file exists in your storage account container most likely you’ve not set the access permissions on your storage container to allow anonymous blob access. Blobs that are shared via Azure CDN must support anonymous access. Turning it on is easy.

1 – Navigate to your Azure Storage account and then ‘Containers’ and select the relevant container and click ‘Change access level’

Setting access on a container

2 – Select ‘Blob (anonymous read access for blobs only)’

Azure Storage account container access