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 trialJason Marlin
1,166 PointsHelp! My image won't load in OS X but it will in Windows? Why!?!
So all I'm trying to do is get my image to load and display in the browser but it just won't. I'm using Mac OS X Yosemite. Reason I'm stating this is because the exact same markup that fails to load on my mac, works fine on my Windows laptop!
<img src=βUsers\jasonmarlin\Documents\logo.pngβ width="350" height="263" alt="Klematis">
I'm doing this exercise from w3 schools: https://www.w3schools.com/css/tryit.asp?filename=trycss_boxmodel_width
so that is my markup in its entirety.
so yeah i am trying to load the page locally from my MAC device and I just can't get the image to load. But when I try this same thing on my laptop I don't even need the path almost at all, it will load with just a simple: <img src="logo.png">
Perhaps i should state that I do swap out the "klematis.jpg" for "logo.png" So don't get hung up on that, but the markup should work work either way because the location is the same....its in the my documents folder on my device in both circumstances.
2 Answers
Jason Marlin
1,166 PointsIs there some kind of syntax difference between OS X and Windows or between Chrome and Safari? I actually tried opening the page in chrome on the mac just now, still not working...
Kevin Gates
15,053 PointsThe reason I'm presuming this isn't working is because you may be missing the file in your Mac environment in the actual file system. You're using backslashes, which means you're not looking to a web page, but a distinct file. That means your mac should have a Users\jasonmarlin\Documents\logo.png
filepath. If it doesn't then nothing will show on your Mac.
Kevin Gates
15,053 PointsKevin Gates
15,053 PointsPosting your code with the Markdown Cheatsheet so it is easier to read:
<img src=βUsers\jasonmarlin\Documents\logo.pngβ width="350" height="263" alt="Klematis">