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


Image Gallery Content

I've been following the path of "How to make a website" section and I'm currently on the "Add Image Gallery Content" video. I want to use my own images and I've copied the code exactly as it shows in the video but when i hit the preview button, none of the text or images are showing up. Please advice me on how to resolve this issue.

1 Answer

To get an image to appear correctly make sure your img tag has the following syntax


  1. Syntax
  2. Adding image to file in root directory
  3. Adding image to file not in root directory ( Notice here you must step out of the myfiles directory to get to the img directory to access the image file)
<img src="img/myPhoto.jpg">
<img src="../img/myPhoto.jpg">

Took me awhile to get this into a format to show the HTML, never used Markdown before