ritwickdey / vscode-live-server

Launch a development local Server with live reload feature for static & dynamic pages.
https://ritwickdey.github.io/vscode-live-server
MIT License
5.59k stars 1.2k forks source link

image not showing in live server #2895

Open Pg5209066 opened 5 months ago

Pg5209066 commented 5 months ago

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
[ ] Other: <!-- Please describe: -->

Current behavior

Expected behavior

Environment

Browser:

- [ ] Chrome (desktop) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:

- Live Server: <!-- Check which version is installed --> 
- Platform:  <!-- Mac, Linux, Windows -->
- Visual Studio Code: <!-- `code --version` -->

Others

Pg5209066 commented 5 months ago

I'm trying to use vs code live server but whenever i use any kind of image it doesn't load or no image is shown. All other coding is visible except this. ![Uploading Screenshot 2024-02-16 053839.png…]()

Pg5209066 commented 5 months ago

Screenshot 2024-02-16 053900

JentoP commented 4 months ago

Try adding one dot before the path. Ex. "./img/image.jpg"

"../img/image.jpg" -will not work "/project/img/image.jpg" -will not work