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

JavaScript JavaScript Basics Hello, JavaScript! What to Expect

The GIF wouldn't appear on the screen and it said error. why is that happening?

when i copy the line of code into a website the gif wouldnt show up and there was an error in the console.

I found it didn't work for me on some sites because of certain permissions of the site. If you look back at the code, it told me in red what wasn't being loaded and why. It said the script violated some law of privacy. So I tried it on a different website, and the gif and other images loaded.

5 Answers

Robert Young
Robert Young
8,188 Points

I think that some browser security settings don't like the .gif autoloading... but i don't know.

I had to change the image URL that was being referenced, so not a cat but a chick. Worked after that.

I had the same experience as Victoria. I tried it first on one web site and the image appeared. However, after trying in on the MDN web site, I got the image error.

I had a similar problem. Firefox wouldn't even let me paste the code. Try this: 1.) open up the workspace in Google Chrome. 2.) select "Preview Workspace" (eye icon on the top right) 3.) press ctrl + shift + j 4.) copy and paste the preview.js code into the console and hit enter

Good luck!

Syed Pasha
seal-mask
.a{fill-rule:evenodd;}techdegree
Syed Pasha
Full Stack JavaScript Techdegree Student 204 Points

gif does not work because I believe its not available anymore. I went to giphy and got a different gif URL and it worked right away.