IIS .webp file - add a MIME Type - HTTP error 404.3

In this post, I describe how to add support for a .webp file in IIS and ASP.NET to fix the error:

"HTTP Error 404.3 - Not Found

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map."

Screenshot of HTTP Error 404.3 - Not Found


Cause

This error occurs because I'm trying to access an image in WebP format on a site in IIS or ASP.NET which does not have the .webp MIME type added.


Resolution

ASP.NET

To resolve the error in ASP.NET, add the following to web.config:

        <system.webServer>
            <staticContent>                
                <mimeMap fileExtension=".webp" mimeType="image/webp" />
            </staticContent>
        </system.webServer>

IIS

To resolve the error in IIS Manager:

- Open IIS

- Go to your site then double click MIME Types:

Screenshot of MIME Types in IIS

- Press Add... under Actions in the top right:

Screenshot of adding a MIME type in IIS

- Enter .webp as the File name extension and image/webp as the MIME type:

Screenshot of .webp MIME type in IIS

The WebP image should now load successfully:

Screenshot of WebP image loaded successfully

Comments

Popular posts from this blog

LG TV This app will now restart to free up more memory

LG TV Clear All Browsing History Data

LG TV turn off Quick Start in settings