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 trialSam Hardy
524 PointsSo I seem to be having an issue with no matter which file I choose the picture won't appear in my web page.
I will post the line and code that I used and the name of the image
<img src="img/Batman-Wallpaper-3.jpg" alt="">
3 Answers
Duncan Casey
391 PointsI was having the same problem Sam, but I had dragged the index.html file into the new img folder, which was causing the error. Drag it back out of the img folder and it will work properly.
Mike Hickman
19,817 PointsThe actual code is right, so I would double-check (and triple-check) a couple things:
- Is the file name the EXACT same (including the extension..is jpg uppercase/lowercase in the file name?)
- Is the img folder in the same main directory of your html page?
- Make sure the image was uploaded into the img directory instead of it accidentally getting put somewhere else
Hard to help other than that without seeing the whole setup.
Good luck!
Sam Hardy
524 PointsThanks Mike!
Saad Ahmad Khan
Courses Plus Student 418 PointsMike Hickman i was experiencing the same problem, but when i double checked my code i found the image file name was wrong.
Fuad B
458 PointsGood explanation Mike, I'll add 2 cents here: also make sure to check the img folder is named img only, and not img.html thinking that might be an html file like the index.html file instead of a folder which should be named only img. good luck!
Sam Hardy
524 PointsSam Hardy
524 PointsI had my image in the wrong folder lol! Ooopsss. Thank you everybody for the help