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

Alexander Rivera
Alexander Rivera
2,302 Points

Images not appearing in "Add Image Gallery Content"

Hello,

I have passed every challenge up to this point and am currently still watching the video for this section. My code looks exactly like his, and I've uploaded the images into my workspace, but for some reason when I preview, blank image replacements appear above the captions as if the image cannot be found.

What am I doing wrong?

Thank you.

Andrew McCormick
Andrew McCormick
17,730 Points

please paste in your code so that we can better help you.
thanks.
posting code to forum

2 Answers

Alexander Rivera
Alexander Rivera
2,302 Points
<!DOCTYPE html>
<html>
  <header>
  </header>
  <body>
    <header>
      <a href="index.html">
        <h1>Alex Rivera</h1>
        <h2>Designer</h2>
      </a>
     <nav>
      <ul>
       <li><a href="index.html">Index</a></li>
       <li><a href="about.html">About</a></li>
       <li><a href="contact.html">Contact</a></li>
      </ul>
    </nav> 
    </header>
     <section>
      <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>Experimentation with color and texture.</p>
          </a>
        </li>
        <li>
          <a href="img/numbers-06.jpg">
            <img src="img/numbers-06.jpg" alt="">
            <p>Experimentation with color and texture.</p>
          </a>
        </li>
        <li>
          <a href="img/numbers-09.jpg">
            <img src="img/numbers-09.jpg" alt="">
            <p>Experimentation with color and texture.</p>
          </a>
        </li>
        <li>
          <a href="img/numbers-12.jpg">
            <img src="img/numbers-12jpg" alt"">
            <p>Experimentation with color and texture.</p>
          </a>
        </li>
      </ul>
    </section>
    <footer></footer>
  </body>
  <footer>
    <p>&copy; 2014 Alex Rivera</p>
  </footer>
</html>

The captions under the img src's are placeholders. Thanks!

Andrew McCormick
Andrew McCormick
17,730 Points

hmm. All that works when I paste into a workspace with those files. See this workspace: http://teamtreehouse.com/workspaces/258962#. Double check how your workspace looks compared to this one. Make sure your index file and img folder are on the same level, that your images are inside your img folder, the little things like that.
If you still have an issue, paste the link to your workspace here.

Dave McFarland
Dave McFarland
Treehouse Teacher

Alexander Rivera can you post a screenshot of your workspace? Or just type in the structure you see in the left sidebar:

  • index.html
  • img ++ numbers-06.jpg

I've seen people accidentally drag the wrong folder into the workspace -- for example the root folder for the project -- which changes how the paths work in your site. In other words, you should have the index.html file and the img folder at the same "level" (in the same folder) in the site.

Stone Preston
Stone Preston
42,016 Points

are you sure you have those images placed in a folder called img in the root of your project and their names are correct? Id double check that first. your code looks correct to me except the last one which needs the period

<img src="img/numbers-12jpg" alt"">

should be

<img src="img/numbers-12.jpg" alt"">