Posts

Showing posts from March, 2022

Add an image to markdown file (Github and local computer) and solve the problem that the image can't be displayed in the md file preview

Contents [ hide ] 1. Github[^1] Chinese version: Zhihu 1. Github [1] 1.1. Locate in the same folder If the image is at the same folder with the md file, for example, "username/example.md" and "username/1.png", then you should just input: ![](1.png) 1.2. Locate in different places If the image locates in "username/docs/assets/1.png" and the md file locates in "username/docs/example.md"then you should input : ![](/docs/assets/1.png) 1.3. URL If the url of the image is "https: //example/1.jpg", then you should input: ![](https: //example/1.jpg) 2. Local computer Markdown editor: VS Code Extention: Markdown Preview Enhanced by Yiyi Wang 2.1. Locate in the same folder If the image is at the same folder with the md file, for example, "C:\Users\X\Desktop\example .md" and "C...