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 trialjames mchugh
6,234 PointsI'm try to load images to a practice website using workspaces.
It appears I'm using the wrong file path possibly. I've tried the direct path. The folder is named images and the image is names sunsetCity. I've actually have 5 images and have tried a few different paths. For example images/sunsetCity and ../images/sunsetOcean and ../../images/durianOpen, but none of my images will load to the webpage. I uploaded the images from my Macbook directly to the workspace then made a folder called images This is a link to a snapshot of my workspace http://w.trhou.se/g351z4rddn
Thanks,
James
4 Answers
james mchugh
6,234 PointsI was using curly quotations on my textEdit. If you use mac this may be a problem for you. To change your quotations to programmer quotations click apple in the top left > the system preferences > keyboard > select text on the top > uncheck the use smart quotes and dashes tab.
Agnes Demes
6,613 PointsHi , the ../ would be a good example to use if the index.htm file was located in another folder such as folder HTML but in this scenario only the images are in a separate folder. You almost there only that the Image name defined as IMG_ before every image therefore it is part of its name.
"images/IMG_nameofimage.Jpg"
james mchugh
6,234 PointsI tried that also, I'll try it again. I made a simple site w/ a image of my fiancee I'm gonna look at the path of that also.
Agnes Demes
6,613 PointsI've just checked your file and it is still coded as
<img src= βimages/sunsetCity.jpgβ alt="My test image"> instead of <img src= βimages/IMG_sunsetCity.jpgβ alt="My test image">
james mchugh
6,234 Pointsyeah I tried "images/IMG_sunsetCity.jpg" and it didn't load, so then I removed the IMG_ from every image file and it still won't load my photos to the webpage.
Agnes Demes
6,613 Pointshhmmm can you please post a new link with the latest solution. Also sometimes its a good idea to relaunch the project preview as browser can be slower to catch up.
james mchugh
6,234 PointsOk Thank you I'll do that right now
james mchugh
6,234 PointsI just tried on the Chrome browser also, and it's not working there either.
james mchugh
6,234 PointsAgnes, Thanks for your help yesterday. I really appreciate it.
jessecarter
8,444 Pointsjessecarter
8,444 PointsBy the look of your screenshot the name of your image is IMG_sunsetCity.jpg. See if this works:
<img src="images/IMG_sunsetCity.jpg" alt="Sunset">