webp images not showing up in App Service

Satyam Chauhan 487 Reputation points


I have an Angular application, where I have used webp image format as recommended in page speed insight test. On running the application locally, the webp images are loading fine but when I am deploying the same application to an azure app service I get the error - 404 not found for the images.

Please help, how can I fix this error.


Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,773 questions
0 comments No comments
{count} votes

Accepted answer
  1. Achraf Ben Alaya 971 Reputation points MVP

    Hello ,
    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.
    Example :

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

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful