Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website Creating HTML Content Structure the Image Gallery

fredyrosales
fredyrosales
10,572 Points

Picture is not loading.

Ok so i tried my own picture adding it to my workspace and i wrote the code correct but when i go to preview it, it just loads a tiny box. I tried the picture he used but still nothing. i will be adding a screenshot of my workspace in just a moment.

Make sure that your file path is correct. If your img file is located outside the directory as your .html you will need to add path code so it can be retrieved from your .html.

5 Answers

fredyrosales
fredyrosales
10,572 Points

I'm having trouble uploading the screenshot. i drag the picture straight from my desktop but it just loads the picture in the browser not letting me do anything.

can you paste your code where you are trying to add the img? You might copy and paste your file path to your image so we can see that too.

fredyrosales
fredyrosales
10,572 Points

<img src="img/numbers-01.jpg" alt=""

Did you add a closing bracket to the img ( '>' )?

fredyrosales
fredyrosales
10,572 Points

no i didn't because when i was following the video he never did.

Okay, do you have a folder named img with the image located inside? that is inside the directory with your .html files?

fredyrosales
fredyrosales
10,572 Points

i got it. when i was supposed to make a folder my workspace was glitching out and i didn not notice. all good now! thanks again haha

okay cool, no problem :)