Next.js Image Component scenarios to Optimize Large PNGs, Results in High Network Latency
I'm wondering if anyone has experience with I'm optimizing some code but I'm wondering if anyone has experience with I'm integrating two systems and I'm currently working with an scenario where the Next.js Image component is not optimizing large PNG images, leading to significantly high network latency during page load... My application is built using Next.js version 13.0.0, and I've configured the Image component to handle images from a cloud storage service. However, when I try to load a large PNG (around 5MB), it results in slow loading times and the browser console shows a warning: `Image with src "https://example.com/large-image.png" is not being optimized.` I've tried using the `priority` prop to improve loading performance, but that seems to have no effect. Hereβs a snippet of my code: ```jsx import Image from 'next/image'; const MyComponent = () => { return ( <div> <Image src="https://example.com/large-image.png" alt="Large Image" width={800} height={600} priority /> </div> ); }; export default MyComponent; ``` I've also confirmed that my image is accessible and the URL is correct, since it loads fine without the Image component. I attempted to compress the PNG using various online tools to reduce its size, yet the optimization warning continues. Is there a specific configuration or maybe a workaround I should consider to better handle large PNG images in Next.js? Any insights or recommendations would be greatly appreciated! Any help would be greatly appreciated! Thanks, I really appreciate it! This is my first time working with Javascript 3.11. This is part of a larger web app I'm building. Any suggestions would be helpful. Thanks for your help in advance!