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"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension="webp" mimeType="image/webp" />
</staticContent>
</system.webServer>
</configuration>
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.