Images are broken

I uploaded the whole files to my github repository and redownloaded it to see if its working. when I open the .html, almost all images are looks broken even tho images are in the file. I've checked the path destiny and it is true. But when I host it as a live server from VSCODE it got fixed, I can see all of the images pretty good. What is the problem?
No description
No description
No description
24 Replies
b1mind
b1mindβ€’10mo ago
this probably has to do with paths local/vs host show us devtools what it looks like on github (img src="") and what your folder stucture looks like?
UixBauhaus
UixBauhausβ€’10mo ago
Okay 1 minute
b1mind
b1mindβ€’10mo ago
best if you just share the repo/hosted but that will get us closer πŸ˜„
UixBauhaus
UixBauhausβ€’10mo ago
syre sure*
UixBauhaus
UixBauhausβ€’10mo ago
GitHub
GitHub - realchugunov/Website
Contribute to realchugunov/Website development by creating an account on GitHub.
UixBauhaus
UixBauhausβ€’10mo ago
No description
UixBauhaus
UixBauhausβ€’10mo ago
For example Agriculture image
UixBauhaus
UixBauhausβ€’10mo ago
No description
UixBauhaus
UixBauhausβ€’10mo ago
No description
UixBauhaus
UixBauhausβ€’10mo ago
No description
b1mind
b1mindβ€’10mo ago
ah yup ! so / is a root path its looking for those images on github pages in the root which your github pages address is something like https://user.github.io/folder where folder is your home dir ./ is a relative to its folder
UixBauhaus
UixBauhausβ€’10mo ago
Yes
b1mind
b1mindβ€’10mo ago
so either remove the starting / or use ./ you will see other things you loading probably work cause you are using a relative path (without /)
b1mind
b1mindβ€’10mo ago
these probably work
No description
UixBauhaus
UixBauhausβ€’10mo ago
Okay let me try
b1mind
b1mindβ€’10mo ago
No description
b1mind
b1mindβ€’10mo ago
would not load
b1mind
b1mindβ€’10mo ago
No description
UixBauhaus
UixBauhausβ€’10mo ago
I'll try this right now Yes now it is fixed I've tried with . Thank you
b1mind
b1mindβ€’10mo ago
welcome! just make sure you understand the why, its really important going forward πŸ˜„ paths/urls is something that some how gets missed in learning web dev idk how... and its like most important (routing, deps, files, etc.) ../ is up a dir
snxxwyy
snxxwyyβ€’10mo ago
I’ve always known that as back a dir πŸ˜…
b1mind
b1mindβ€’10mo ago
I mean guess that is all in how you view a path/tree
snxxwyy
snxxwyyβ€’10mo ago
That’s true yeah
b1mind
b1mindβ€’10mo ago
either straight line (back) or in a tree (up) I'm not pedantic about that stuff... call it what ever lets you remember how it works πŸ˜„