So I'm trying to add .webp image support for a WordPress site, which is run on IIS.
Now the image exists on the server and the file name is correct but when I try to load the image via URL address in the browser I get the 404 error.
404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
Anyone know how I might resolve this issue?
I tried added <add extension=".webp" policy="CacheUntilChange" kernelCachePolicy="DontCache" />
but this doesn't work as it's to do with caching.
Is there somewhere were I can allow access to certain file types?
Do I maybe need to allow the filetype through the firewall?
I'm still new to working with IIS so I'm a little lost.
Cheers
You'll need to add this config to your webconfig file:
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".webp" mimeType="image/webp" />
</staticContent>
</system.webServer>
</configuration>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With