banner
叶星优酸乳

叶星优酸乳

从阅读中汲取勇气和力量
twitter
tg_channel
mastodon

Obsidian automatically uploads images to image hosting: Aliyun OSS+PicGo

When using Obsidian for note-taking, sometimes it is necessary to insert images for illustration, especially for tutorials or course notes. If local images are used, many images will be synchronized locally on the mobile phone. If they are accidentally cleared, the note images will be lost.

After thinking about it, it is still necessary to set up an image hosting service to store the images. So I chose the solution of Aliyun OSS + PicGo. Aliyun OSS is only 8 yuan per year, which is incredibly cheap.

After spending more than ten minutes to purchase and configure, the experience is good. The configuration process is recorded below.

1. Purchase and Configure Aliyun OSS Service#

Purchase Aliyun Object Storage Service (OSS)#

  1. Open the Aliyun OSS product link.
  2. Click on "Discount Package".
  3. Purchase according to your needs. If it is only used as an image hosting service, the default 40GB should be sufficient, and it costs 8 yuan per year.

image

image

Create a Bucket#

  1. After the purchase is completed, go back to "Object Storage OSS".
  2. Click on "Create Bucket".
  3. If there are no special requirements, except for setting "Read and Write Permissions" to "Public Read and Write", leave the rest as default and click "Confirm".

image

image

Add a New User#

  1. Click on the profile picture, then click on "Access Control".
  2. Click on "Users" and create a new user. Fill in the "Login Name" and "Display Name" as desired, then click "Confirm" and remember to save the "AccessKey ID" and "AccessKey Secret". They will be needed for configuring PicGo later.
  3. In the user's operation menu, click on "Add Permissions" and select "Manage Object Storage Service (OSS)", then click "Confirm".

image

image

image

Recharge#

After the configuration is done, it is recommended to recharge some balance. When others access your images, Aliyun charges based on usage. If there is no balance in your account, it will result in service suspension due to arrears, and the images will not be accessible.

The so-called usage-based billing means that the more traffic there is, the more it will cost. You can check the billing rules for specific details. However, there is no need to worry too much. For a blog like mine, it costs less than a few cents per month, and if the cost within an hour is less than one cent, it will be rounded down to zero. I checked the records, and most of them were rounded down to zero, so there is no need to spend money. Just in case, it is still recommended to recharge some balance to prevent arrears.

2. Install and Configure PicGo#

Install and Configure PicGo#

  1. Download and install PicGo directly from GitHub. It is recommended to install the stable version.
  2. Open PicGo and select the Aliyun OSS settings. The specific configuration is as follows:
    • Set KeyId: Use the saved "AccessKey ID" from earlier.
    • Set KeySecret: Use the saved "AccessKey Secret" from earlier.
    • Set Bucket Name: Use the name of the created bucket.
    • Confirm Storage Region: Check the access domain in the bucket list, as shown in the screenshot below.
    • Specify Storage Path: The default setting is fine. You can check the uploaded images in the bucket list under "File Management".
  3. Set the rest according to your needs or leave them as default, then click "Confirm" to finish.

image

image

image

3. Configure Automatic Image Upload in Obsidian#

On the desktop, it can be achieved through plugins.

  1. Search and install the Obsidian plugin: Obsidian Image Auto Upload Plugin.
  2. Use the default configuration or customize it according to your needs.
  3. Copy the image to the note and check if it is uploaded successfully.

image

Many times, when the computer is not around, it is also possible to upload to the image hosting service on the mobile phone and then insert the image using the link.

One method is to install the PicGo mobile app, which is free.

  1. Install Flutter-PicGo.
  2. Configure the Aliyun image hosting service according to the settings in the desktop PicGo.
  3. Upload a test image, and the link will be automatically copied. You still need to manually enter the Markdown image insertion format. This aspect needs improvement (this software can also delete images from the cloud).

image

Of course, you can also seek a better experience, such as installing Xiaobai Image Hosting or Gudong Cloud Image and other applications. The basic functions are free, but some advanced features require payment.

References:

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.