Preface#
Considering the need to distribute Obsidian notes to multiple platforms, one of the most cumbersome tasks is to repeatedly copy and paste images in the articles. To reduce this repetitive workload, one solution used here is to use Tencent Cloud Object Storage as an image hosting tool, and build an automated image uploading process with the help of the image uploading tool PicGo and the Obsidian plugin image auto upload plugin.
Preparation#
Register Tencent Cloud and enable Object Storage service#
-
Visit the Tencent Cloud official website to register an account and complete the real-name verification. It is recommended to register using WeChat.
-
After entering the console, select Object Storage. The first-time activation comes with a 6-month free quota resource package.
-
Select Create Bucket.
-
Fill in the basic information. Make sure to check the option for Public Read permission to ensure that the images you upload can be accessed publicly.
-
The advanced configuration can be left as default, or adjusted according to your needs.
-
After successful creation, you can create a folder to manage the uploaded images.
Obtain the access key information#
-
In the console, go to Common Tools > Key Management and click Access Keys.
-
Click Create Key to generate a new access key. You can copy and save it securely. (It will be used in PicGo later)
Install PicGo#
- Go to the PicGo official website and choose any download source to download and install PicGo.
- Once installed, open the software.
Configure Tencent Cloud COS in PicGo#
For detailed documentation, please visit the PicGo configuration manual.
Here, I will provide the configuration for version 5:
-
APPID, SecretId, and SecretKey can be obtained from the Key Management section.
-
The bucket name and storage region code can be obtained from the bucket list in your console.
-
Test if the upload is successful
Go back to PicGo, select Tencent Cloud COS, and upload an image.
If the upload is successful, proceed to the next step to set up automatic image uploading in Obsidian.
Install the image auto upload plugin in Obsidian#
-
In Obsidian, go to Settings > Third-party Plugins > Community Plugins, and search for "image auto upload". Install and enable the plugin.
-
Note: Use the default settings and ==make sure PicGo is running in order to achieve automatic uploading==.
Afterwards, whenever you paste an image while writing notes in Obsidian, it will be automatically uploaded to Tencent Cloud Object Storage instead of being saved locally, and a link to the image will be automatically returned.
Bulk upload all images in previous articles#
- In the article where you want to upload images, use the shortcut ==Ctrl + P== to open the command palette, type ==upload all images==, and press Enter to start the automatic upload. It can also replace the original image links. Perfect!