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. There is a 6-month free quota resource package for the first-time activation.
-
Select Create Bucket.
-
Fill in the basic information, and make sure to select the option with Public Read permission to ensure that the uploaded images 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.
- After installation, open the software.
Configure Tencent Cloud COS in PicGo#
For detailed official documentation, please visit: PicGo Configuration Manual
Here, I will configure the v5 version:
-
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, search for "image auto upload", and install and enable the plugin.
-
Note: Use the default settings and ==make sure PicGo is running in order to achieve automatic uploading==.
Afterwards, every time 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 automatic uploading. It can also replace the original image links. Perfect!