I am replacing the website's images from .jpg to .webp. The way I use is through modernizr to detect whether the browser can accept webp and then set the background-image. But, there's always errors for webp images. Is there anything I haven't set? or what can I do to solve this question?
I already tried to change background-color and it worked.
<script src="js/modernizr-custom.js"></script>
<style type="text/css">
.no-webp .bg {
background-image: url('Image/img_Head02.jpg');
}
.webp .bg {
background-image: url('Image/img_Head02.webp');
}
I expect that the images in webp type can show up on the website. But now, there's an error: GET http://test.poct-bio.com/JobW/Image/img_Head02.webp 404 (Not Found)
webp
to iis mime types. – Luann