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 trialOtto Mejia
744 PointsWhy doesn't my image appear on the About page?
I tried everything. I'm trying to add a file to my about.html and all I get is either a broken link icon or nothing at all. I've been following the how to build a website course and they said any image works. So I tried using one of my pictures from my computer and resized it in photoshop to match the sample from the one the video has. To my misfortune I can't get the image to appear. It seems like the workspace was acting slow, so I restarted it. I have my image in the img folder and I have the right img source in the code in between my section tags in my About.html. Am I doing something wrong?
Otto Mejia
744 Points<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Otto Mejia | Designer</title>
<link rel="stylesheet" href="css/normalize.css">
<link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400italic,
700italic,400,700,800' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<header>
<a href="index.html" id="logo">
<h1>Otto Mejia</h1>
<h2>Designer</h2>
</a>
<nav>
<ul>
<li><a href="index.html">Portfolio</a></li>
<li><a href="about.html" class="selected">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<div id="wrapper">
<section>
<img src="img/para_la_cutie.jpg" alt="Photograph of cutie" class="profile-photo">
<h3>About</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
lobortis tempor lorem, vel consequat risus pretium non. Pellentesque
placerat, arcu sit amet malesuada semper Ut sed sagittis lacus,
et molestie erat. Nam dignissim quam risus, vel mattis neque convallis cursus.
Quisque dignissim sodales porta..</p>
<p>Donec augue tellus, pulvinar sit amet elit lacinia, vehicula pharetra erat.
Quisque placerat mi sit amet enim nean lobortis consequat tellus in sodales.
Nunc pellentesque nisi sit amet odio consequat tincidunt.
commodo <a href:"https://twitter.com/Otto__me"</a>@tempor</a></p>
</section>
<footer>
<a href="https://twitter.com/Otto__me">
<img src="img/twitter-wrap.png" alt="Twitter logo" class="social-icon"></a>
<a href="http://facebook.com/nickpettit">
<img src="img/facebook-wrap.png" alt="Facebook logo"class="social-icon"></a>
<p>© 2015 Otto Mejia</p>
</footer>
</div>
</body>
</html>
Here it is.
Double RR
16,272 PointsTry using an image from google images to see if it works and resize it in the img tag. <img src="http://www.whateversite.com/wp-content/pic.jpg" width="100px" height="100px">
3 Answers
richardwheeler
8,332 PointsMr. Mejia,
I would recommend that you double check that your code matches the .img exactly in the code and in the .img folder. If they are the same and if you still have a copy of the photo on your computer check what size the file is and the file type. Try changing to a .png or .jpeg depending on what it currently is set to. Also, you might try another web browser other than the one you're using. If none of that works post back here with your code.
-Rich W
Otto Mejia
744 PointsNevermind, it worked. I turned off my computer for a while and came back an hour later and everything worked without me touching the code. I knew I did nothing wrong... Sometimes its the damn program or website that doesn't work.
Cesar Marroquin
10,520 PointsOne common error that i would always have when i knew for sure that i wrote the image location perfectly and everything seemed fine was that my image had the wrong extension. for example in my code i would write for example dog.jpg when in fact it was a png. Maybe that is your problem check to see if it has the right extension, if not let me know
Otto Mejia
744 PointsI tried it. It didn't work with the right file extension. It's just treehouse workspace that doesn't work when you want it to.
Bob Beaumont
1,317 PointsOtto ~ Just wanted to say that is true for me sometimes as well. glad I saw you post. I've often had an issue where the coding was completely fine. I try not to fret, take a break, reload the workspace and Ta Da! All is good!
Cesar Marroquin
10,520 PointsCesar Marroquin
10,520 PointsHi, can i see your a sample of your code? Maybe i can help you with your problem