Saturday 4th November, 2023
It gives error when you want to set the Next.js width to 100% and fill the full height of its container.
For that use this code below in you image file, to avoid errors:
<Image
src={…}
width={0}
height={0}
sizes=”100vw”
style={{ width: ‘100%’, height: ‘auto’ }}
/>
You can learn more by following my social media:
Support my blog by this link: https://buymeacoffee.com/edx126
Posted by Edgar Hovhannisyan