Markdown Paste image VS Code
Paste an Image from clipboard into markdown for VS Code
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
There are other plugins that had this feature, but they were not maintained, had bugs, or had tons of features I didn't want. So here is a simple extension that does one thing and one thing only and does it with tests!
Example on Ubuntu
Below are the options you can set in your
Image Folder Path
The destination to save image file.
You can use variable
Default Image Name
The default image file name. The value of this config will be pass to the 'format' function of Luxon library, you can read document https://moment.github.io/luxon/#/formatting?id=table-of-tokens for usage. If you have text selected, it will be used as the file name instead.
Image Name Prefix
The string prepended to the image file name.
Image Name Suffix
The string appended to the image file name.
Image Uri Path Prefix
The string prepended to the resolved image path. Can be used if you want to supply a custom domain to image url.
Image Uri Path Suffix
The string appended to the resolved image path. Can be used if you want to supply a custom parameters to image url.
The string appended to the image file name. How to encode image path before insert to editor.
The pattern of string that would be pasted to text.
Show File Path Confirm Input Box
Set to true if you want to be able to change the file path or name prior to saving the file to disk
File Path Confirm Input Box Mode
Set the mode of file path confirm input box
I wanted to make this plugin after issues with markdown image paste mushan.vscode-paste-image. After looking for an alternative and finding out that it looked like there were half a dozen copies and most were forks, or no longer maintained.