MD Super Paste
Paste images directly into Markdown files. The extension saves the clipboard image in a directory configured for the current workspace and inserts a Markdown image link at the cursor. If the clipboard contains text instead of an image, VS Code's normal paste behavior is unchanged.
Features
- Only handles
.md documents whose VS Code language is markdown.
- Disabled by default and configurable per workspace.
- Creates the image directory automatically.
- Supports PNG, JPEG, GIF, WebP, BMP, TIFF, SVG, and other image clipboard MIME types.
- Works with multi-root workspaces by reading settings for the Markdown document's workspace folder.
- Uses VS Code's clipboard data-transfer API, so no platform-specific clipboard utility is required.
Configuration
Create or edit .vscode/settings.json in your workspace:
{
"markdownImagePaste.enabled": true,
"markdownImagePaste.imageDirectory": "images",
"markdownImagePaste.relativePathPrefix": "./images"
}
Settings:
markdownImagePaste.enabled: enables the extension in this workspace. Default: false.
markdownImagePaste.imageDirectory: where pasted image files are saved. A relative value is resolved from the workspace folder. Default: images.
markdownImagePaste.relativePathPrefix: prefix written before the generated filename in the Markdown image link. If empty, the extension writes the image's absolute filesystem path. Default: empty.
For example, with the configuration above, the inserted Markdown target starts with ./images/ and is followed by a collision-resistant timestamped PNG filename.
Development
npm install
npm run compile
npm test
Press F5 in VS Code to launch an Extension Development Host.
Packaging
Replace your-publisher-id in package.json with your Marketplace publisher ID, then run:
npm run package
This creates a .vsix file that can be installed locally or published to the Visual Studio Marketplace.