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 Add Image Gallery Content

Rui Bao
Rui Bao
310 Points

Hi! For the step of adding image gallery content, why when I preview, all images are not showed and broken?

Hi! For the step of adding image gallery content, I followed the steps and wrote the code, but finally when I preview, all images are not showed and broken. What's the reason of it? Thanks!

2 Answers

roxannecarlson
roxannecarlson
8,131 Points

Without seeing the code, it is hard to answer the question. I suspect that the path you are using is not ../img/photoname.jpg. Check to see if your code matches exactly what was taught. Sometimes, there are teacher notes to help you out at the bottom of the lesson.

The path doesn`t have to be exactly ../img/photoname.jpg, but it has to match wherever the image file is actually located. It is hard to explain here, but what you can do is that put the image into the file wherever your index.html document is located, and just put photoname.jpg Check the image type also. It could be png, jpg, or jpeg depends on the picture you are using.