Next js Image error for url request solve?

32 Views Asked by At

I use next js Image tag to render my images and optimize them but when I share the url of my image as src to the Image tag. it says self signed certificate error and doesn't return the image what should I do?

<Image
 className={`${isSmall ? styles.SmallImg : styles.Img}`}
 src={img}
 alt={title}
 width={400}
 height={300}
 quality={80}
/>

this returns the error instead of image

1

There are 1 best solutions below

3
Omar Afet On

If you're encountering a self-signed certificate error, running your app with the --experimental-https flag may help. This feature is available starting from version 13.5.1 and later.