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 Introduction to HTML and CSS (2016) HTML: The Structural Foundation of Web Pages and Applications Image Tags

Placeimg url

Hi guys!

I just watched the portion of the video where we went to "PlaceIMG" and got the substitute URL. I chose the animal URL and I plugged it into my workspace. I saved and refreshed my preview page and a picture of a cat appeared but when I refreshed the page, the image of the cat was still there. I noticed in the video, when the instructor plugged her substitute URL in, the image changed every time she clicked refresh. In conclusion, is the link to the animal images glitching out on PlaceIMG's end or did I do something incorrectly?

Here is my code:

<img src="http://placeimg.com/400/400/animals" alt="Drawing of Jane Smith" class="profile-image">

Thanks for your help, guys! Happy Coding :)

2 Answers

Jon Myzzle
Jon Myzzle
6,279 Points

Hello Allison,

I almost want to say I think the website itself may be glitching out. I tried to create a makeshift index.html on my desktop as follows and got a wonderful picture of a dog that wouldn't change as i refreshed the page:

<!doctype html>
<html>
  <body>
    <img src="https://placeimg.com/640/480/any">
  </body>
</html>

However, i tried a different website called Lorem Pixel and linked the url for a random image from there and it worked just fine.

<!doctype html>
<html>
  <body>
    <img src="http://lorempixel.com/400/200">
  </body>
</html>

With that said, I believe its just the placeimg website.

Hope that helps, Cheers!! :beers:

Hi Allison, it may be an issue with clearing your browser's cache. When a web page loads portions of it are stored on computer to make for quicker load times the next time you visit it. In chrome, if you go to history>clear browser data and then select clear cached images it may kick-start it into showing a new image. Hope this helps.

Brendan Berg-Jacobson
Brendan Berg-Jacobson
1,067 Points

I just asked this question! I tried the clear cache fix, and this worked precisely once. I now have a new image I am stuck on. Any thoughts on this Randy? Is the placeimg website glitching?