skip to Main Content

i put the code like this to see the picture in preview in visual studio code :

<a href="https://media.wired.com/photos/598e35fb99d76447c4eb1f28/master/pass/phonepicutres-TA.jpg"</a>

and received the error like this:

Previewing a file that is not a child of the server root. To see fully
correct relative file links, please open a workspace at the project
root or consider changing your server root settings for Live Preview.

What am I doing wrong?

<a href="https://media.wired.com/photos/598e35fb99d76447c4eb1f28/master/pass/phonepicutres-TA.jpg"</a>

2

Answers


  1. Hope You’re doing well

    It might be your extension problem. So Press (Ctrl + P) in VS Code and paste below command. it would be fixed.

    ext install kisstkondoros.vscode-gutter-preview

    Login or Signup to reply.
  2. Because maybe you are using an anchor tag without specifying an tag to actually show the image. The error message you’re receiving might be related to how the preview functionality in Visual Studio Code is interpreting your code.

    <img src="https://media.wired.com/photos/598e35fb99d76447c4eb1f28/master/pass/phonepicutres-TA.jpg" alt="Description of the image">
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search