Images in NextJS not working when replacing a new image

Viewed 14

I try to replace my current banner with any other images to see if they works but any image that I put leads to error when using it using Image from next/image and even in just simple <image> tag. It says The requested resource isn't a valid image. when I go to the url. All images are under of /public/images.

Here's the code for Image (the working 1)

    <Image
       src={"/banner.png"}
       alt="Image"
       layout="fill"
       objectFit="contain"
    />

But when I change the /banner.png into new name (ofcourse existing image too under the /public/images/), it just error with code 400 on request.

0 Answers
Related