This post is about using Visual Studio Code to include screenshots in markdown files, so you can publish your files without upload the images or change the links (something sometimes you can't do at all)
For that we are going to use Imgur and a VS Code extension called vscode-imgur
Installing vscode-imgur
We can install it from the Extensions panel in VS Code, searching for vscode-imgur
-
We need to configure the Imgur credentials
-
Open the VS Code configuration with CTRL + , then search and replace the following keys
- Client_id
- Client_secret
- Album_id
- User upload en true
-
With your VS Code window active, you can paste an image in your clipboard using CTRL + ALT + V, this command will upload our image to Imgur and will add the link in our markdown file
The first time we use it, we will be redirected to the Imgur for confirmation. Copy the provided pin and paste it in VS Code
Top comments (0)