Next.js Discord

Discord Forum

next.js image not rendering

Answered
Giant Chinchilla posted this in #help-forum
Open in Discord
Giant ChinchillaOP
 <div className="left-part">
      <Link href="https://github.com/tom-mcivor" passHref>
          <div className="small">Toms Blog</div>
          <Image src="/tom.png" alt="Tom"
          width={200}
          height={200}
           />
      </Link>
    </div>

does anyone know why my image isn't rendering?
Answered by aardani
if the image is readily available in your repository, its better if you import the image and pass the image object to the src props
View full answer

14 Replies

Can you provide more information?
Like where the image is and et cetera
@aardani Can you provide more information?
Giant ChinchillaOP
Try inspecting the element on the <img> part
Giant ChinchillaOP
should i just make it an img tag instead of <Image/>
if the image is readily available in your repository, its better if you import the image and pass the image object to the src props
Answer
Giant ChinchillaOP
i put he image right next to the page.tsx file so i didn't have any file destination problems
yes
you should try importing it
see the example on the link i gave you
Giant ChinchillaOP
trying
wow it worked you're a genius
Glad it worked, have a nice day