方式一: 用GitHub配置图床
前置条件:
-
安装PICGO:
-
解决mac安装打开失败问题:“PicGo”已损坏,无法打开。 你应该将它移到废纸篓。
sudo xattr -r -d com.apple.quarantine /Applications/PicGo.app
-
配置picgo:
- 配置GitHub图床,参考URL: https://picgo.github.io/PicGo-Doc/zh/guide/config.html#github图床
- GitHub图床配置:
- 仓库名: wenhaofree/Image
- 分支名:master
- token:https://github.com/settings/tokens 生成token,选择指定仓库,日期永远,得到token, 记得要设置对读写权限;
- 存储路径:blog/
- 自定义域名:https://cdn.wenhaofree.com/gh/wenhaofree/Image
- 因为已经提前配置cnd域名,设置路径为https://cdn.wenhaofree.com/gh/wenhaofree/Image
- 验证:上传图片,查看返回的URL是否可以正常打开图片