This plugin cloud upload all local images embedded in markdown to specified remote image store (support imgur,AliYun OSS and Imagekit, currently) and export markdown with image urls to clipboard directly. The origin markdown in vault is still using local images.
It will be help for publishing to the static site such GitHub pages.
The idea of plugin comes from the powerful markdown editor MWeb Pro I have been used for years.
During plugin development, I also referred to plugins obsidian-imgur-plugin (the imgur uploading codes is from it) and obsidian-image-auto-upload-plugin. Thanks both for providing such great plugins.
This plugin is listed in the Obsidian community plugins now.
Open command and type "publish page", it will upload all local images to remote store and copy markdown with replaced image syntax to clipboard with notification.
- support uploading images to more storages
- imageur
- Aliyun Oss
- ImageKit
- Amazon S3
- TencentCloud COS
- more...
- setting for replacing images embedded in origin markdown directly
To make changes to this plugin, first ensure you have the dependencies installed.
npm install
To start building the plugin with what mode enabled run the following command:
npm run dev
Note: If you haven't already installed the hot-reload-plugin you'll be prompted to. You need to enable that plugin in your obsidian vault before hot-reloading will start. You might need to refresh your plugin list for it to show up.
To start a release build run the following command:
npm run build
- obsidian-imgur-plugin (reference to the imgur uploading codes in it)
- obsidian-image-auto-upload-plugin
- create-obsidian-plugin
Imgur service usually has a daily upload limits. To overcome this, create and use your own Client ID. This is generally easy, by following the steps below :
-
If you do not have an imgur.com account, create one first.
-
Visit https://api.imgur.com/oauth2/addclient and generate Client ID for Obsidian with following settings:
- provide any application name, i.e. "Obsidian"
- choose "OAuth 2 authorization without a callback URL" (important)
- Add your E-Mail
-
Copy the Client ID. (Note: You only need Client ID. The Client secret is a private info that is not required by this plugin. Keep it safe with you)
-
Paste this Client ID in plugin settings