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 HTML Objects Images

Sean Flanagan
Sean Flanagan
33,235 Points

Can't include image

Hi guys and girls.

I can type in the name of the image and file extension in the img src="" line, but when I refresh the browser, nothing happens. The picture is stored offline on my PC.

Thanks in advance.

Sean

1 Answer

Hayden Taylor
Hayden Taylor
5,076 Points

There are a few things that could be happening here.

The most common is browser cache, the browsers likes to store a version of each website so it doesn't have to reload things constantly so this may be happening and to clear it is a bit different for each browsers. If using firefox you could do it in the preferences or download the addon: Empty Cache Button.

Also you may be not linking to the image file properly. An easy way to check is to look at the source code (firefox mac ->> command + u) and find the code which you are trying to link the image and copy the path and drop that in your web browser bar to see if you can link to the image via that.

If that test fails post the image source (src="stuff in here") and we can try and debug it together.

Sean Flanagan
Sean Flanagan
33,235 Points

Yippee! I right-clicked on the image, clicked on Properties, copied the file location into the code, saved it, refreshed the browser and hey presto, there it was! Problem solved! Thanks Hayden. You're very kind!

Sean