Obsidian Imgur Plugin

Maintainability Rating Installations count

This plugin uploads images to imgur.com instead of storing them locally in your vault.

obsidian-imgur-plugin-demo

Why?

Obsidian stores all the data locally by design (which is perfect for text and, in my opinion, can be improved for images). If you often add pictures to your notes, your vault can quickly grow in size. Which in turn can lead to reaching limits if you use free plans of cloud storage services to sync your notes or can lead to growth of repository size if you use git to back up your notes.

This plugin is a perfect solution for people who paste images to their notes on daily basis (i.e. students making screenshots of lecture slides) and do not want to clutter their vaults with image files.

Having remote images also makes it much easier to share a note with anyone else, you will only need to share a single file.

If you are uncertain if this solution is for you, you can check out the FAQ section and/or a video created by @santiyounger discussing pros and cons of this approach

Santi Younger - Use Images Like A Pro

Features

Installation

Install the plugin via the Community Plugins tab within Obsidian

Getting started

Authenticated upload

Go to plugin's settings, select 'Authenticated Imgur upload' and complete authentication. That's all! Now you are ready to make notes and upload all your images remotely. You will see all your uploaded images at https://your_login.imgur.com/all/

Anonymous upload

You might not want to see your Obsidian images tied to Imgur account.

For this case there is an 'Anonymous Imgur upload' option. To perform anonymous uploads, the plugin needs a Client ID. This plugin is already shipped with the embedded Client ID, which will be used by default until you provide your own. But this same Client ID will also be used by other users around the world, which may lead to reaching daily upload limits for this shared Client ID.

If you face problems with anonymous images upload, it is recommended to generate your own Client ID. Please follow instructions below.

Obtaining your own Client ID

If you do not have an imgur.com account, you need to get one first.

After you signed in, go to https://api.imgur.com/oauth2/addclient and generate Client ID for Obsidian:

You only need Client ID, Client secret is not required, no need to record it.

FAQ

Q: How secure this approach is?
A: Nobody sees your uploaded image unless you share a link or someone magically guesses an URL to your image.

Q: Can I remove a remote image uploaded by accident?
A: For authenticated uploads - yes, go to https://your_login.imgur.com/all/, for anonymous uploads - no (it is technically possible, but you will need a deleteHash which is not recorded. I would record it, but there is no place for logging in Obsidian yet)

Q: For how long an image stays at imgur.com? Is there a chance to lose the data?
A: For authenticated uploads, I guess they are never deleted. What about anonymous uploads? Earlier it was stated on Imgur website that the image you upload stays forever. I think this is true since 2015. Today I could not find this statement on Imgur website. I can assume that images that did not receive any view for years, can be removed, but there is nothing to worry about. You can read my detailed thoughts on this in discussions

Q: Imgur supports videos. Does the plugin support videos upload?
A: No. Initially, I did not consider videos upload support since there is no Markdown syntax to embed videos. On the other hand, you can simply use <video> HTML tag, so I will probably add support for videos in future

Q: Can it upload images to some other service?
A: For now, there are no plans to support other image hosting solutions, but it should not be difficult for you to make a fork and create your own implementation of ImageUploader interface.

Discussion

If you have any questions/suggestions, consider using GitHub Discussions. There is also a plugin's thread on Obsidian forum.

Known limitations

Known issues

Contribution

Contributions are welcomed. Check out the DEVELOPMENT.md to get started with the code.

Your support

If this plugin is helpful to you, you can show your ❤️ by giving it a star ⭐️ on GitHub. You can also buy me a coffee using Ko-fi:

ko-fi