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

HTML How to Make a Website Creating HTML Content Add Image Gallery Content

images not showing up in preview

when I add the image number-01.jpg then preview, I don't see the image. Its just a small box where the image is supposed to be.

<ul> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Experimentation with color and texture.</p> </a> </li>

    <li>
      <a href="img/numbers-02.jpg">
        <img src="img/numbers-02.jpg" alt="">
        <p>Playing with blending modes in photshop.</p>
      </a>
    </li>

    <li>
      <a href="img/numbers-06.jpg">
        <img src="img/numbers-06.jpg" alt="">
        <p>Trying to creat an 80"s style of glow.</p>
      </a>
    </li>

    <li>
      <a href="img/numbers-09.jpg">
        <img src="img/numbers-09.jpg" alt="">
        <p>Drips created using photoshop brushes.</p>
      </a>
    </li>

    <li>
      <a href="img/numbers-12.jpg">
        <img src="img/numbers-01.jpg" alt="">
        <p>Creating shapes using repitition.</p>
      </a>
    </li>     
  </ul>
</section>

I just added this same code to my code challenge and it work fine. Yet when I try to preview in workspaces the images dont show up

3 Answers

Lee Stetson
Lee Stetson
16,944 Points

Hi Niger,

First things first. Please check to make sure you spelled the name of the file correctly. Also, did you add the images into a folder called "img" in workspaces?

If you remove the "img/" from the <img> tag, save, and refresh, does the image show? That would indicate you have the images stored in the same directly.

Review the video http://teamtreehouse.com/library/how-to-make-a-website/creating-html-content/structure-the-image-gallery to learn about creating the img folder.

Thx

Wayne Priestley
Wayne Priestley
19,579 Points

Hi Niger,

Make sure your image folder is called img

Hope this helps.

Callum Lock
Callum Lock
7,290 Points

Have you linked the image correctly? That's the only thing i could possibly see wrong with it...