Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include image as Markdown in Visual Studio Code?

How can I include an image from the same destination folder as of the document as Markdown in Visual Studio Code?

I tried this, but it didn't work:

![Getting Started](./2/to/img.jpg) 
like image 812
Jyo Fanidam Avatar asked Mar 22 '17 20:03

Jyo Fanidam


People also ask

How do you copy an image in markdown?

Copy an image. Hit ctrl+alt+v to paste image to markdown document.


2 Answers

If the image is in the same directory as the Markdown file, you can use either:

![Getting Started](./img.jpg) ![Getting Started](img.jpg) 

For a workspace layout like:

docs/     images/         img.jpg     README.md 

In README.md, this would be either:

![Getting Started](./images/img.jpg) ![Getting Started](images/img.jpg) 
like image 160
Matt Bierner Avatar answered Oct 13 '22 23:10

Matt Bierner


Question is old, however, I found a very nice plugin within visual studio code Paste Image

As the plugin suggests you can paste the image onto markdown file by pressing ctrl(cmd) + Alt +V.

Or

Open command palate pressing ctrl(cmd) + shift + p and select paste image. In the background the plugin creates a image file with date/time and puts reference on the markdown.

like image 28
Shambu Avatar answered Oct 14 '22 00:10

Shambu