Build a free image bed

Build a free image bed

​ Realize the local image upload network, and can quickly access.

purpose

The pictures are uploaded to the network so that after writing a local blog, they can be copied directly to the bolg website for use without modifying the picture connection.

tool

github: Used for image network storage.

picGo: Picture bed tool, used to upload pictures conveniently.

jsdelivr: A CDN provider for NPM (mirror) and github static access.

step

1. Download picGo . Because it is downloaded via github, it may be slow. After downloading and installing, select the displayed image bed as github.

image-20210108142422382

2. Register github and create your own github repository. The name of the repository I set up here is myimage .

image-20210108144318658

3. Set the access token of github (save after setting the number), location: avatar-"Settings-" Developer settings-"Personal access tokens

4. To splice the address prefix of the pictures in the dgithub warehouse accessed through the jsdelivr content distribution network, refer to the jsdelivr homepage address description. The splicing address description is as follows:

https://cdn.jsdelivr.net/gh/ gihub registered username/warehouse name@warehouse branch name

Example (in the example, master and branch name main correspond to the same effect): https://cdn.jsdelivr.net/gh/cloudinwinter/myimage@master/

5. Fill in the information obtained in the above steps into the upload settings of the github image bed in the picGo application.

image-20210108145654531

6. Once configured, in the upload area of ​​picGo, click on the picture to upload.

​ Successful example: https://cdn.jsdelivr.net/gh/cloudinwinter/myimage@main/blogImg/20210108133022.jpg

7. If it fails, check the relevant configuration

Upload failed, whether the warehouse name, branch name, and token are configured incorrectly.

After the upload is successful, the browser input address cannot be accessed, check whether there is any problem with the set custom domain name.

Off topic

Realize automatic image upload when writing blog through typera

typera after (a very useful markdown text editor), the combined picGo use local images can be quickly uploaded to the network, then our blog after written it can be copied directly to the major blog platforms, and copy Image access problem.

1. Download and install typera from the above address.

2. Menu bar-"Format-"Image -" Global image settings-"Upload service settings. The configuration is as shown in the figure below.

image-20210108152624245

3. After configuration, every time you copy the clipboard picture to the editing interface of Typera, Typera will display the upload button, and the picture address in the article will be automatically updated to the network picture address after uploading.

Note that the above usage needs to be edited every time picGo is started.

You need to configure the port number of the local service when the picGo application starts. PicGo Settings-"Set Server -" Port is set to 36677.

image-20210108153431924

Tucao about the pits encountered before

1. At first, the image access was realized through the github pages function, but an account can only be configured with one warehouse to realize the github pages function. This function has been used by my blog. And the access speed is really not fast in China.

2. Upload the normal github warehouse for access. The address provided is probably like this: https://raw.githubusercontent.com/cloudinwinter/myimage/main/blogImg/20210108132925.jpg. It was possible before, but now the browser prompts a security issue. Although you can add a trusted certificate locally, you can't expect others to add it too, and the speed is not good.

3. Tried to use gitee with picGo, the address example after success: https://gitee.com/cloudinwinter/blogimg/raw/master/img/20201029152732.jpg, but found that the picture is larger than 1M, you need to log in before you can access it. This is really not very reliable.

4. In the end, the video of an up master of bilibili finally solved this problem for me. Thank you here and attach the video link: https://www.bilibili.com/video/BV1f4411z73J?from=search&seid=9010025456989855396

Guess you like

Origin blog.csdn.net/qq_40182873/article/details/112366798