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

Sonya Galaviz
Sonya Galaviz
169 Points

Image does not appear

My image is not showing. My codes look correct. Here is my snapshot.

https://teamtreehouse.com/workspaces/10698172

Roy Penrod
Roy Penrod
19,810 Points

The link to your snapshot didn't work. It would be great if you could link to your workspace so we could see your folder structure.

When an image doesn't appear , it's almost always something to do with the src path being off in relation to where your document is stored.

Your img src attribute looks correct and it should work IF your html document isn't in any other folder and there's a folder named img that contains the file "number-01.jpg".

You might also want to check the file and make sure it's a jpg file type not a png.

11 Answers

Sonya Galaviz
Sonya Galaviz
169 Points

i don't have a css folder. Nick hasn't mentioned anything about that up to this point.

Roy Penrod
Roy Penrod
19,810 Points

Ok, that's fine. You'll add one down the road.

Now go into the img folder. Do you see the file named "numbers-01.jpg"? Is it singular ("number-01.jpg") or plural ("numbers-01.jpg")?

Sonya Galaviz
Sonya Galaviz
169 Points

It is a jpg file and in the correct folder. I linked my workspace snapshot above

Roy Penrod
Roy Penrod
19,810 Points

The link doesn't work, Sonya. The error message says it doesn't exist.

Sonya Galaviz
Sonya Galaviz
169 Points

Then I guess I'm stuck Roy. When I click the link it works for me. https://teamtreehouse.com/workspaces/10698172

Thanks anyway

Roy Penrod
Roy Penrod
19,810 Points

I don't give up that easy. :-)

Ok, let's take a look at your folder structure. Does it look like this?

img    <-- this is a folder
css     <-- this is a folder
index.html     <-- this is your html file
Roy Penrod
Roy Penrod
19,810 Points

Now look at your img tag again. Does it look like this exactly:

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

The things to pay attention to are that it's a "/" and that you used a dash ("-") and not an underscore ("_").

Sonya Galaviz
Sonya Galaviz
169 Points

that was it. I was missing the = sign after src. thanks!!!

Roy Penrod
Roy Penrod
19,810 Points

You're welcome, Sonya. It's always the little things that will drive you nuts. ;-)

Sonya Galaviz
Sonya Galaviz
169 Points

FOR SURE! Thanks for your patience.

The images will not upload in the workspace.

img folder does not allow for images to be uploaded.