Image file src problem

So i have some images which are within folders when i hit Go live on VS code they works properly but when i open index file directly o browser the source broke
27 Replies
Israr
IsrarOP•2y ago
here's how it looks when i open it directly
Israr
IsrarOP•2y ago
Israr
IsrarOP•2y ago
Israr
IsrarOP•2y ago
tried adding
../
../
but didn't work
Mannix
Mannix•2y ago
how about ./ oh the 2nd pic shows icon folder and your link is pointing to img folder not icons folder
Israr
IsrarOP•2y ago
ops sorry but ya its in the right folder
Mannix
Mannix•2y ago
the name has _ or is just space between supplying and Candidates ?
Israr
IsrarOP•2y ago
this workedd i've used hypen i have smae problem with a video
Israr
IsrarOP•2y ago
Mannix
Mannix•2y ago
what is the path in the code?
Israr
IsrarOP•2y ago
Israr
IsrarOP•2y ago
thanks for this man 🤧
Mannix
Mannix•2y ago
thumbup
Israr
IsrarOP•2y ago
what other options we have here? i dot get this when i go live on VS code it works properly
Mannix
Mannix•2y ago
the video is mp4 and the type in code is video/mp4??
Israr
IsrarOP•2y ago
yes
Mannix
Mannix•2y ago
when you hover over the link in dev tools where does want to go?
Israr
IsrarOP•2y ago
Mannix
Mannix•2y ago
you have ../ not ./
Israr
IsrarOP•2y ago
tried both file:///img/bg/...
Mannix
Mannix•2y ago
ok set it to ./ then open browser dev tools and open the file in new window do you have your site live so i can check it ?
Israr
IsrarOP•2y ago
it worked!!!! not yet thanks mate
Mannix
Mannix•2y ago
no problem 🙂
Israr
IsrarOP•2y ago
been dealing with it for past 2 days😂 ngl it feels lil dumb after knowing what was the mistake 😂😬
Mannix
Mannix•2y ago
with problem like this dev tools is the best thing to troubleshoot. You just open your page inpect it and check what is the actual path and then you try to correct it in your code 🙂
Israr
IsrarOP•2y ago
right got that, will surely do that thanks again!
Mannix
Mannix•2y ago
good luck 🙂
Want results from more Discord servers?
Add your server