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
Walter Rodas
700 PointsMy Images Don't Show Up on My Browser?
why aren't my photos showing up on my browser? when i downloaded the images from treehouse, i placed them in a specific file called html. so when i plug it in, they just won't show up on my browser. all i see is a rectangular shape with a broken picture in it...
this is an example:
<img src="html/logo.gif" alt="Smells Like Baking">
Thanks for your help..
5 Answers
Amit Bijlani
Treehouse Guest TeacherIt was depends on your folder structure. Where is your index.html located?
Let's say your folder structure looks something like this:
html
|--- index.html
|--- logo.gif
In this case, your image is at the same level as your html file and so your img tag should look like this:
<img src="logo.gif" alt="Smells Like Baking">
Evan Horn
187 Points-
Amit Bijlani
Treehouse Guest TeacherIf all your images in a folder named 'img' then your img tag should reflect that in the src attribute
<img src="img/logo.gif" alt="Smells Like Baking">
Matt Conlon
2,205 PointsAlways try and make your folder structure as simple as possible. Folder structure is probably one of the most common mistakes why images don't appear in the browser (I included made this mistake)
I always go for a folder structure like this:
1.Name of project (Root Folder) 2.CSS (contains my CSS (sub folder)) 3.Img (contains my images (sub folder))
Walter Rodas
700 Pointsthanks a lot for your help.. :)