Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Command Palette Entry to upload image #22

Open
mahadevan opened this issue Jan 26, 2022 · 1 comment
Open

Feature Request - Command Palette Entry to upload image #22

mahadevan opened this issue Jan 26, 2022 · 1 comment

Comments

@mahadevan
Copy link

There is no way to attach an image other than "drag & drop" image onto Obsidian. A Ctrl+P, Command Palette entry would be awesome. Users can attach images directly from obsidian by Command or shortcut instead of dragging & dropping them into the note.

@gavvvr
Copy link
Owner

gavvvr commented Jan 26, 2022

Hi @mahadevan

Thanks for sharing your idea about Command palette entry.

First I would like to correct you:

There is no way to attach an image other than "drag & drop" image onto Obsidian

That's not quite right. The primary way to paste an image is to press Cmd/Ctrl+V actually. In this case the source of image is obviously the current content of your clipboard. Drag'n'Drop is also supported as you mentioned.

Now, let's get back to your idea of having a palette command. What would be the source of image, when you trigger a palette command to upload at Imgur? I can imagine the situation that you might want to upload a current local image under your cursor with palette command to avoid touching the mouse, but the upload of local images (#7) is not yet implemented unfortunately. Let me know if this is what you meant. If I got you right, that's a good idea, I like the command what will free a user from using the mouse.

The most difficult part here will be to implement the upload of local image. I already have a POC in a upload-existing-image-POC branch. The upload is working, but I also want to implement removal of local image and replacement of an old link to a local image in the whole Vault with a just created Imgur link (that's the most difficult part for now, because it will require a significant amount of time from me. There is no public API for such a batch replacement and to find such code in private API you need to debug uglified JavaScript code)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants