Embed remote images

I had a plugin request here but it was closed due to inactivity:

Can anybody make a plugin to fetch the image behind the link and paste it below the link in the note?
Or give me a hint how to make one on my own?
I am pasting multiple such links daily into my notes and it would save me much time.

Thank you very much in advance!

This is the preview function, which can be achieved

Which one do you mean?

This could maybe be part of the Paste Special plugin that is worked on for GSoC.

1 Like

Sure @kally, this can be achieved by converting the image url to blob base 64 encode and adding it to the note. I'm working on Paste Special project as @tessus mentioned above. Although tessus, the priority of GSoC project is converting and pasting csv to markdown and getting the best out of that feature but surely this addon can be added to project future development or if timeline is spared.

Yes, I agree. However, the GSoC should make a modular approach possible. I believe one of the parts of the project is to create a framework for different Paste Special actions, even though only one action was planned for the GSoC.

1 Like

If I understand well, the question is about displaying a preview of the website below the link, is that correct? In that case, you'll have to bundle a headless browser with the plugin or somehow leverage Electron to render the website to a thumbnail. Either way, that's probably out of scope for GSoC, and perhaps not really related to Paste Special?

I think it was about (downloading the image as attachment and) showing the image, if the link points to an image.

P.S.: This shouldn't be done autonatically, but a Paste Special > Insert link as image could do the trick.

Yes, that's the idea.. to make it modular as possible, so as to increase it's functionality for different file formats.

1 Like

Hmm, there are several things in this thread so not sure what we're talking about. Pasting text that contains image URLs already downloads the image and converts it to a local resource, so it's already implemented. The original post is about ENEX import, which is unrelated.

1 Like

Oh laurent i guess tessus was talking upon sally's concern with the image pasting by url as her post was revoked due to being not resolved or replied, mentioned above. Although, if that's already been developed. Please do lead her way.

I am confused too now but my request was to paste a link to an image and joplin should insert the image below the link.
It would not bother me if I would have to first paste the link as text and then a second time as Paste Special > Insert link as image as I need both, link and image.
Is this possible or planned in any way?

That seems like a convoluted way to do something simple. Why not paste the image directly? In your browser you can right click on the image and "Copy image" then paste this image in Joplin.

Edit: ok now I get it, you also want to keep the link to the image.

Yeah kally. The idea is to create a function to paste image from a link to an image (aws s3, in your example), that will be pasted as image below the link in the editor. So, you'd have both shown in editor.

Wow that is exactly what I am looking for!
Do you know by when this is planned to be implemented?

1 Like

Oh, that i can once try locally on my machine. If laurent approves this as a feature, then it can be surely merged.

It would be a plugin so if you'd like to implement this feel free to do so.

oh that'd make it a little harder to implement, as the GSoC is starting soon. But i can try later that or if any developer wanna go ahead and create that then i'd surely help him/her out.

1 Like

If you want to implement a plugin for uploading images pasted to joplin to the remote end (such as github/smms), you can take a look at [picgo-core]( PicGo/PicGo-Core: A tool for pictures uploading. Both CLI & API supports . (github.com)), it supports a lot of upload targets, refer to: PicGo/Awesome-PicGo: A collection of awesome projects using PicGo. ( github.com)

Hi coderrsid,
did you have time to look into this plugin?
Unfortunately I really don't know how to achieve this.
Thanks in advance for your reply!