Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 4

Broken images

Solved! Go to Solution.

Hi Guys,


It is first time here and I need immediate help.


I am a newbie coder and I have just recently completed my portfolio. When I first deployed my portfolio on github pages everything worked well and images for my project section were showing but during my last commit the images are now showing as broken. I am using VS code and when I launch the live server the images are showing fine. 


here is a snippet:


image on the right is viewing the projects page with live server and the left is thru gitbhub pages.

image not working.jpg



If you must check my code to check the problem. here is the repo: 

3 Replies
Pilot Lvl 1
Message 2 of 4

Re: Broken images

Hi @eatcodesforlife,


It looks like the issue is the two dots plus the slash "../"at the beginning of your images' src attributes. This is basically a reference to a folder up one directory from /portfolio/ -- it refers to the root of your github pages ( in this case. Since projects.html is in the same directory as /img, you can refer to it like this :





 I'm not sure what the result would be on your live server, but you can open the devtools and hover the src to see where it's getting the images from, like in the example above, if there's any issues on your end.

Copilot Lvl 2
Message 3 of 4

Re: Broken images

Hey @SethClydesdale,


That worked! Thanks a mil!

Ground Controller Lvl 1
Message 4 of 4

Re: Broken images


i had tried adding ../  but its look nothing have changed



link :-