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 trialCarlton Jackson
851 PointsI can't get my images to randomly change on my practice page. What am I doing incorrectly?
I've started over several times just to make sure I haven't added an unnecessary space somewhere or etc., but I still can not get the placeholder to comply...
8 Answers
mouseandweb
13,758 PointsHi all, the image doesn't refresh because the browser needs a "hard reload". If you are using Chrome browser you can hit ctrlShiftR to get that refresh. Or simply hold ctrl and hit the reload icon in the browser, it does the same job.
vmishra
16,365 Pointspost this in your index.html after </footer> and before </body>:
<script> document.querySelector("img").src += "?nocache=" +Math.random();</script>
Seokhyun Wie
Full Stack JavaScript Techdegree Graduate 21,606 PointsI tried, but it's still not working. Probably there's an issue with PlaceIMG.
Alexis Perez
1,883 PointsThanks, This fixed the issue
johnot11
2,315 PointsThank's vmishra, your solution worked.
Alita Edmonds
6,068 PointsHi Carlton - I have experienced the same problem too. This might be a problem with the image site, but it could possibly be an error in the code. Could you copy and paste the code that you are using so that we can see if there is an error? Thanks!
loras
2,782 PointsI`m having the same problem. This is the code:
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>My Profile</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="styles.css"> <link href="https://fonts.googleapis.com/css?family=Muli%7CRoboto:400,300,500,700,900" rel="stylesheet"></head> <body>
<div class="main-nav">
<ul class="nav">
<li class="name">Jane Smith</li>
<li><a href="#">Home</a></li>
<li><a href="resume.html">Experience</a></li>
<li><a href="#">Photos</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<header>
<img src="https://placeimg.com/400/400/animals" alt="Drawing of Jane Smith" class="profile-image">
<h1 class="tag name">Hello, I’m Thais.</h1>
<p class="tag location">My home is Vitoria, ES.</p>
</header>
<main class="flex">
<div class="card">
<h2>Background</h2>
<p>I’m an aspiring web designer who loves everything about the web. I've lived in lots of different places and have worked in lots of different jobs. I’m excited to bring my life experience to the process of building fantastic looking websites.</p>
<p>I’ve been a professional cook and gardener and am a life-long learner who's always interested in expanding my skills.</p>
<ul>
<li>To learn more, <a href="resume.html">view my resume.</a></li>
</ul>
</div>
<div class="card">
<h2>Goals</h2>
<p>I want to master the process of building web sites and increase my knowledge, skills and abilities in:</p>
<ul class="skills">
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li>Ruby</li>
<li>Rails</li>
</ul>
<p>I’d like to work for a web design firm helping clients create an impressive online presence.</p>
</div>
</main>
<footer>
<ul>
<li><a href="#" class="social twitter">Twitter</a></li>
<li><a href="#" class="social linkedin">LinkedIn</a></li>
<li><a href="#" class="social github">Github</a></li>
</ul>
<p class="copyright">Copyright 2015, Jane Smith</p>
</footer>
</body> </html>
Alita Edmonds
6,068 PointsYour code is correct! When I tried using the placeholder image, it reacted the exact same way. Unfortunately, this is most likely a problem with the placeholder image website so I don't think there is really a way to fix it. Sorry about that!
Carlton Jackson
851 PointsThanks everyone!! It's working properly now.
Nicholette Taylor
2,832 PointsThanks vmishra, that worked well.
Jose Reyes
Front End Web Development Techdegree Student 1,613 PointsThank’s vmishra It’s working now.
Ginny Khanna
Front End Web Development Techdegree Student 2,280 PointsThanks vmishra, I was also facing the same issue, your solution worked!!
Adam Farver
7,377 PointsAdam Farver
7,377 PointsNot seeing any code. Happy to help.