Next.js Image Component Not Rendering WebP Format Properly in Older Browsers
I'm confused about I've hit a wall trying to I've looked through the documentation and I'm still confused about I'm sure I'm missing something obvious here, but I'm currently developing a Next.js application using version 12.1.0, and I'm working with an scenario with the Image component when trying to render images in WebP format... The images render perfectly in modern browsers like Chrome and Firefox, but when I test in Safari 12 and older versions of IE, the images do not load at all. I'm using the following code to implement the Image component: ```javascript import Image from 'next/image'; const MyComponent = () => { return ( <div> <Image src='/path/to/image.webp' alt='My WebP Image' width={500} height={300} layout='responsive' /> </div> ); }; export default MyComponent; ``` I made sure that the WebP images are correctly generated and accessible in the public directory. However, when loading the page in Safari or older browsers, I just see a broken image link. I checked the Network tab and noticed that the request for the WebP image results in a 404 behavior, which is strange because the file exists. I've tried using a fallback image in JPEG format but encountered the same rendering scenario when the browser doesnโt support WebP. Hereโs how I attempted to implement the fallback: ```javascript <Image src='/path/to/image.webp' alt='My WebP Image' width={500} height={300} layout='responsive' onError={(e) => { e.currentTarget.src = '/path/to/fallback-image.jpg'; }} /> ``` The onError event doesn't seem to trigger either. I've also ensured that the MIME types for the WebP images are correctly set on the server. Has anyone else faced this scenario? How can I ensure that the Next.js Image component properly handles WebP images across different browsers, especially for older versions? I'm working on a CLI tool that needs to handle this. Any ideas what could be causing this? I'm working with Javascript in a Docker container on Debian. Any pointers in the right direction? I'm working in a Ubuntu 20.04 environment. This is part of a larger desktop app I'm building. Thanks for taking the time to read this!