PicGo 配置与使用
sonderlau ... 2021-08-29 大约 1 分钟
# PicGo 配置与使用
一般我使用 Typora
作为我的主力写作工具,偶尔使用 VSCode
作为补充等。
在写作完之后图片不能自动的上传到博客中,而且即便上传到博客中,势必会对访问的速度有所影响。
于是我使用 PicGo
提供自动化的图片上传并插入连接的服务,配合 Typora
写作起来非常的舒服。
# 下载与安装
npm install -g picgo
1
或者使用一个 GUI 版本 PicGo (opens new window)
在 Releases 中可以找到你想要的系统版本。
在安装后,按照官方文档的配置,使用 GUI 或者编写 JSON 文件都可以。
我在这里使用的是腾讯云对象存储,配置文件如下
配置文件
{
"picBed": {
"current": "tcyun",
"uploader": "tcyun",
"smms": {
"token": ""
},
"tcyun": {
"appId": "",
"area": "ap-shanghai",
"bucket": "",
"customUrl": "",
"path": "imgs/",
"secretId": "",
"secretKey": "",
"version": "v5"
},
"list": [
{
"name": "SM.MS图床",
"type": "smms",
"visible": false
},
{
"name": "腾讯云COS",
"type": "tcyun",
"visible": true
},
{
"name": "GitHub图床",
"type": "github",
"visible": false
},
{
"name": "七牛图床",
"type": "qiniu",
"visible": false
},
{
"name": "Imgur图床",
"type": "imgur",
"visible": false
},
{
"name": "阿里云OSS",
"type": "aliyun",
"visible": false
},
{
"name": "又拍云图床",
"type": "upyun",
"visible": false
}
]
},
"settings": {
"shortKey": {
"picgo:upload": {
"enable": true,
"key": "CommandOrControl+Shift+P",
"name": "upload",
"label": "快捷上传"
}
},
"server": {
"port": 36677,
"host": "127.0.0.1",
"enable": true
},
"privacyEnsure": true,
"showUpdateTip": true,
"autoRename": true,
"autoStart": true
},
"picgoPlugins": {},
"debug": true,
"PICGO_ENV": "GUI",
"needReload": false
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
关于哪些参数需要填写,请参考官方文档 (opens new window)
# Typora 设置
之后在 Typora 里面设置好对应的设置,比如我对本地的图片需要上传,网络上的图片地址不需要上传,可以设置如下: