Can't load an image

Hello I’m doing the tribute page and i can’t load my image. I’m working with visual code and copy paste the relative path of this one but nothing load on my page someone can help please?
Also I don’t know how to put my code so you can read it

Ferdinand Magellan

Ferdinand Magellan

The first person to go around the World

Portrai of Ferdinand Magellan

If you could provide the code, it would be helpful and easier to come up with an answer.

You can just put your code after indenting with three acutes ( this key : `) and close it with the three acutes. That should create a codeblock.

<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<!DOCTYPE html>
<html id="main">
  <header id="title">
    <title>Ferdinand Magellan</title>
    <h1>Ferdinand Magellan</h1>
    <h2> The first person to go around the World </h2>
  </header>
  <body>
    <div id="img-div">
      <img id="image" src="portrait-of-ferdinand-magellan.jpeg" alt="Portrait of Ferdinand Magellan"/>
  </div>
  </body>
</html>

You have given an invalid source as this is not a url, therefore no image can be displayed.
How to get an image link :
https://www.awesomescreenshot.com/video/3623577?key=3cb5fba2759e2f707acefe175dc2e516
After that, just paste the link and you are done. It should work from there onwards.

But the image is in my computer so I gave the source from my computer. Also I tried with an url but it doesn’t work either…

 <body>
    <div id="img-div">
      <img id="image" src="https://en.wikipedia.org/wiki/Ferdinand_Magellan" alt="Portrait of Ferdinand Magellan"/>
  </div>
  </body>
</html>

still not woking and I don’t get why

I got it! Visual code had a problème! i closed and reopen it and it works now hahahaha

This is not going to work because that URL does not point to an image but to the whole page. If I hover over that image on that page, right-click it and select “Copy Image Address” and paste that into the URL, I now get that image.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.