In version 0.2.0, vscode-md support "upload image" function to upload images to a cloud image storage via picgo-core.
- Set
"vscode-md.image.pathType": "picgo"
. - Create config file for picgo:
{
"picBed": {
"uploader": "smms",
"smms": {
"token": "token of smms"
}
}
}
This example uses smms as a place to store pictures. You need to log in sm.ms and get a token from the dashboard.
In addition, you can also use Github, Imgur, Qiniu Cloud, Tencent Cloud COS, Upyun Cloud, Aliyun OSS
- Set
vscode-md.picgo.configPath
:
- Reopen your markdown file
{
"picBed": {
"uploader": "github",
"github": {
"repo": "", // user/repo
"token": "", // github token
"path": "", // storage path
"customUrl": "", // customized domain
"branch": "" // branch, master by default
}
}
}
For more information -> 📖 https://picgo.github.io/PicGo-Doc/en/guide/config.html#github-img
{
"picBed": {
"uploader": "imgur",
"imgur": {
"clientId": "", // your clientId
"proxy": "" // proxy address, only http supported
}
}
}
For more information -> 📖 https://picgo.github.io/PicGo-Doc/en/guide/config.html#imgur-img
{
"picBed": {
"uploader": "qiniu",
"qiniu": {
"accessKey": "",
"secretKey": "",
"bucket": "", // storage bucket
"url": "", // customized domain
"area": "z0" | "z1" | "z2" | "na0" | "as0", // storage area
"options": "", // URL suffix
"path": "" // storage path
}
}
}
For more information -> 📖 https://picgo.github.io/PicGo-Doc/en/guide/config.html#qiuniu-img
For more information -> 📖 https://picgo.github.io/PicGo-Doc/en/guide/config.html#tencent-cloud-cos
For more information -> 📖 https://picgo.github.io/PicGo-Doc/en/guide/config.html#upyun-cloud
For more information -> 📖 https://picgo.github.io/PicGo-Doc/en/guide/config.html#aliyun-oss