Configure Typora Image Upload with PicGo and Alibaba Cloud OSS – A Step‑by‑Step Guide
This tutorial explains how to set up a reliable image‑hosting solution for Typora by installing PicGo, configuring it to use Alibaba Cloud OSS, and walking through each command‑line step, including bucket creation, AccessKey setup, and uploader selection.
Background
Markdown is increasingly popular for blogs and PDFs, and Typora is a widely used local Markdown editor. The author needed a stable image‑hosting solution because free services like iPic often fail, so they built a custom PicGo‑based uploader backed by Alibaba Cloud OSS.
Typora and PicGo Overview
Typora can invoke external commands for image uploads. PicGo offers three modes: PicGo Core (CLI), PicGo app, and a custom command. This guide focuses on the custom command mode.
Installing PicGo Core
PicGo depends on Node.js. Install Node.js from the official site if it is not present, then verify the installation:
zzs$ node -v
v16.18.1
zzs$ npm -v
8.19.2Install PicGo globally via npm or yarn:
npm install picgo -g
# or
yarn global add picgoConfirm the installation path and version:
zzs$ which picgo
/usr/local/bin/picgo
zzs$ picgo -v
1.5.0Configuring PicGo in Typora
In Typora’s preferences, choose “Custom Command” and set the command to picgo upload. If PicGo is not in the default bin directory, replace picgo with the full path obtained from which. Use picgo -h to view additional options.
Creating an Alibaba Cloud OSS Bucket
OSS (Object Storage Service) provides inexpensive object storage. Log in to the Alibaba Cloud console, create a new bucket with “Public Read” permission, and note the bucket name and external domain (e.g., mybucket-oss-cn-beijing.aliyuncs.com). Then generate an AccessKey ID and AccessKey Secret under “AccessKey Management” for API access.
Configuring PicGo to Use OSS
Run the interactive PicGo configuration to select the OSS uploader:
$ picgo set uploader
? Choose a(n) uploader (Use arrow keys)
smms
❯ aliyun
tcyun
github
qiniu
imgur
upyunProvide the following prompts:
Enter accessKeyId – your AccessKey ID.
Enter accessKeySecret – your AccessKey Secret.
Enter bucket – the bucket name you created.
Enter the region, e.g., oss-cn-beijing.
Enter the storage path inside the bucket, e.g., typora/.
Enter a custom domain, e.g., https://mybucket-oss-cn-beijing.aliyuncs.com.
After completing the prompts, select the uploader:
zzs$ picgo use uploader
? Use an uploader (Use arrow keys)
❯ aliyun
tcyun
smms
github
qiniu
imgur
upyunPicGo will now upload images to the configured OSS bucket.
Conclusion
The guide demonstrates a complete, free solution for image hosting in Typora by combining PicGo with Alibaba Cloud OSS, avoiding unreliable free image hosts and ensuring images remain accessible.
Senior Brother's Insights
A public account focused on workplace, career growth, team management, and self-improvement. The author is the writer of books including 'SpringBoot Technology Insider' and 'Drools 8 Rule Engine: Core Technology and Practice'.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
