Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Latest commit

 

History

History
103 lines (74 loc) · 2.57 KB

Upload-Image.md

File metadata and controls

103 lines (74 loc) · 2.57 KB

Summary

In version 0.2.0, vscode-md support "upload image" function to upload images to a cloud image storage via picgo-core.

Usage

  1. Set "vscode-md.image.pathType": "picgo" .
  2. 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

  1. Set vscode-md.picgo.configPath:

1591096424517.png

  1. Reopen your markdown file

More

Github

{
  "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

Imgur

{
  "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

Qiniu Cloud

{
  "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

Tencent Cloud COS

For more information -> 📖 https://picgo.github.io/PicGo-Doc/en/guide/config.html#tencent-cloud-cos

Upyun Cloud

For more information -> 📖 https://picgo.github.io/PicGo-Doc/en/guide/config.html#upyun-cloud

Aliyun OSS

For more information -> 📖 https://picgo.github.io/PicGo-Doc/en/guide/config.html#aliyun-oss