Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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 :)