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
Christopher Whatford
178 PointsUploading Images using HTML
Hi All. I'm very new to coding and HTML. Parallel to completing the courses, I wanted to create my own website, a professional profile.
I am having a strange issue with uploading images to the website. 2 different images, one will load the other will not. The code is fine (i can swap the names around and it loads / doesn't load the other image), the security settings are the same, the image type is the same. It is something with the image file I think but I'm not sure what the problem is? Can anyone help me diagnose the issue?
I am on Windows 8, using jpg, png, gif files (I have tried saving as all 3).
regards
Chris
Christopher Whatford
178 Points "' <img src="img/profile.jpg" alt="prof">"'
2 Answers
Christopher Whatford
178 Points'''html
<!DOCTYPE HTML>
<html>
<head>
<title>Christopher Whatford</title>
</head>
<body>
<div id= "Header">
<img src="img/profile.jpg" alt="prof">
<h1>Christopher Whatford</h1>
<h2>Driving Digital Change</h2>
</div>
</body>
</html>
'''
Thanks, as you can see - code is very simple. If I change the name of the image, it picks up other files in the img folder
Alexandra Silcox
24,486 PointsSo other images within that directory are displaying when you put their name instead? If it's not a path level issue, it might seem simple but are you making sure the image name is correct or even the image is in the correct folder? I don't know how many times I missed a character or forgot to put an image in the right directory.
Chris Dziewa
17,781 PointsChris Dziewa
17,781 PointsPlease post your html code here so we can help.