Image from computer file

Hello,
please i need some help in attaching an image from my computer file in html.
Any help is greatly appreciated.

Hello there,

It is difficult to help you, if you do not provide more specific information, or any code:

  • What tools are you using? (Editors, online platforms, plain files?)
  • What is your workspace directory structure? (Where are you storing the images and the html file)
  • What are you trying to accomplish?

The more information you give us, the more likely we will be able to help.

1 Like

<img src="YourImageName.Extension">

The folder where your html file is in which you are trying to add image. You have to use the above tag. For simplicity it will be better for you to move the image in the same folder where your .html file is currently.

The src attribute inside the img tag above, means that you have to insert your desired image path, in other words, which folder your image is located so that img can know the location of your image to display.

Hope it helps, do let me know for further help.

1 Like

thanks Sky020 & itsrobin4 for your help,
below is the code

Zidane

Tribute Page

i'm building a personal portfolio page and i'm doing it on the freecodecamp. i'm still confuse because it didn't work yet.

Annotation 2020-08-10 031717

oh i was wondering about this too, i used imgbb com for image hosting, then add the url to the html

Hey Barrie,

currently, you are trying to use an image from your personal computer:
<img src="C:\..." />

This does not work for published internet pages, because the page can’t access your personal computer (e.g. because your computer is currently not running).

This is why you have to upload your image to a service that is reachable all the time,
e.g. imgur or imgbb etc.

danzel-py & miku86
thanks you, it was really helpful and i was able to do it using imgbb.

1 Like