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 trialKristina Millikan
588 PointsImage not loading in browser
Hello Treehouse community,
I am having the same issue as several previous users in that the browser is displaying an image icon, rather than the image itself. I've tried in three separate browsers (firefox, microsoft edge, and google chrome), and I tried adding the ../ before the file name, and none of it is working. Here is my code for reference:
<section> <ul> <li> <img src="img/numbers-01.jpg" alt=""> </li> </ul> </section>
Tried <img src="../img/numbers-01.jpg" alt=""> as well. Please clue me in to what I'm doing wrong so I can move forward with the lesson.
Thank you!
1 Answer
Mark Lawson
6,148 PointsDid you follow the instructions about dragging the images into the workspace? Have you named the folder img and placed the images into the folder? If you have done this correctly your code should be <img src="img/numbers-01.jpg" alt="">.
Kristina Millikan
588 PointsThank you! I named the folder images instead of img and I didn't make that connection, lol. Much obliged.
nico dev
20,364 Pointsnico dev
20,364 PointsHi Kristina,
Did you assign the id "gallery" to the ul?
By the way, if you paste code here in the forum, it's easier to read this way: type three times the key under ESC on your keyboard, then type Enter, starting on the next line type/paste your code. Finally, when you finish with your code, type Enter again, and in the next line type again three times the key under ESC on your keyboard.
Did that help?