Reputation: 565
I am trying to add the following code to my DotNetNuke website to improve site performance, but it seems like .WebP format images do not render for some reason, It will show the broken Image icon. I doubled checked the image paths and everything is correct. I had to download a plugin for Photoshop CC so that I can export images to .WebP.
Is there a web.config setting I have to configure?
<picture>
<source srcset="img/awesomeWebPImage.webp" type="image/webp">
<source srcset="img/creakyOldJPEG.jpg" type="image/jpeg">
<img src="img/creakyOldJPEG.jpg" alt="Alt Text!">
</picture>
Upvotes: 0
Views: 509
Reputation: 1098
This is more a problem of your IIS configuration than related to DNN. You have to add a corresponding MIME type, either in IIS manager or manually in the web.config like
<system.webServer>
<staticContent>
...
<mimeMap fileExtension=".webp" mimeType="image/webp" />
...
Upvotes: 1