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

Images not working

I am working on the Add Image Gallery Content portion of How to Make a Website and my images are not displaying correctly, it is just showing a little picture of a page. I am not 100% sure how to share a snapshot of my workspace but I think it would be the best way to show what I am talking about. Here is the link to it..... https://w.trhou.se/fxq4h4cu4t . If this link does not work please let me know.

I have read over my code, reviewed file pathways to the images, and watched the video dozens of times and I am missing what is causing this issue. Probably something simple but I just can't see it. If more information is needed please let me know

Take a look at the folder in which all of your images are stored. It looks like you named the folder 'img.png'. The name of the folder must match the directory link in the <img> tag. Knowing that, there are two things you could do:

1.) Change the source to <img src="img.png/numbers-01.jpg">

2.) Change the folder name from 'img.png' to just 'img'.

Since it looks odd for a folder to have a file extension such as .png, I would suggest simply changing the name of the folder and removing the file extension. since file extensions serve no purpose for folders. Your code looks nice and clean though! Keep up the good work and code on!!

-Jacob D. Castro

1 Answer

You named you folder "img.png" but when you reference it in the "<img src >" tag you are referring to a folder called "img". The easiest way to solve this problem is to rename your folder "img"

I hope that helps

Yes, helps so much. I knew it would be something simple. Thank you!

Yeah it usually is. Sometimes a second pair of eyes will avoid a lot of unnecessary frustration. Best of luck on your programming journey!