1 GitHub creates a warehouse as a drawing bed
1.1 create a warehouse in GitHub
Note that if the warehouse is public, the uploaded image will not be available. If you don’t know how to create a warehouse, you can baidu.
1.2 generate a token in GitHub
This token is for picgo
The page is pulled to the bottom with a green one
Generate tokenButton. Click it to generate a token.
Copy the generated token for picgo to use.
Note: it is better to save the generated token locally, because the next time you enter GitHub, the token will no longer be displayed.
2 picgo client installation
Picgo download address, download the latest version of the. Exe installation package.
Set the GitHub table as the default table after installation.
Here are a few things to pay attention to:
- The format of the warehouse name is
GitHub user name \ warehouse name, there is no need to add HTTP in the front and. Git in the back.
- The branch name uses the default main branch
- Token the token generated in GitHub in the previous step.
- The specified storage path refers to the path in GitHub warehouse. I wrote
img/, so an img directory will be generated under my warehouse, and all pictures will be uploaded to this img directory. The specified storage path is not required and can be left blank.
3 typora settings
3.2 setting upload service
It can be used after setting
Verify image upload optionsThat button is used to verify whether it can be uploaded successfully. Typora will upload an image, and success will return success information. If it fails, it’s probably that there’s something wrong with the configuration of the drawing bed on picgo. Check it.
3.3 set upload picture when inserting picture
I don’t know what this setting is for. After setting, I still need to manually click upload picture.
After inserting a local image into the document, click this on the menu
Upload pictureOptions. After the upload is successful, the local path will be automatically replaced with the URL address in the drawing bed.
5. Upload failure
If there are some successes and some failures, it’s probably because of GitHub’s network speed. Just wait a moment and upload it at another time. (it’s a bit hard to fail to upload all the time. I hope GitHub will land the new one in the Chinese market.)
If it has never been successful, check if picgo’s bed settings are correct.
This article is published by openwrite, an operation tool platform such as blog group post, one article multiple post, etc