Auto attach images as resources after external editor

Some times at external editor (like Typora) needed paste local image to text.
But on return to Joplin image does not attach and preview contain invalid image.
Be useufull that auto attaching images as resources after external editor.

Thanks!

5 Likes

What exactly are you talking about? How do you paste local images to text?
Are you talking about an inline image pointing to a local file in Typora? If that were the case, it should also work in Joplin. Can you please elaborate your issue?

see also

I think they attached an image to a note using typora, and when they return to Joplin they are looking to have that converted to a Joplin reference.

2 Likes

Ok, but I still don’t know how the image is attached (I don’t use Typora, nor do I have it installed to test it).
Is the attachment an inline base64 code, is it a separate resource/file, or is it a reference to a local file?

Here is an example from attaching an image in typora

![1565217959162](/home/caleb/.config/Typora/typora-user-images/1565217959162.png)

In Typora or other editor I can write (in MD format) relative path:

![Image](__download/image.png)

Hi, maybe I have the same issue. I am trying to attach an image to a note using an external text editor (like Atom or sublime). There are some plugins to let you put the image you would like to attach, like with C-v, to a specific folder. I have tried using the one in which my notes are synched, but this does not seem to work. Is there any way I can attach an image using an external text editor?

Thanks a lot already for your reply - and I wanted also to express my appreciation for this app, I really love it!

Unfortunately I don’t know that part of the code too well. Laurent added code that people could also see images when opening a note in an external editor like Typora. I guess the reverse should also be possible somehow. But I don’t know.

Hi, I’m new user of Joplin. The Joplin version is 1.0.179 (Windows 10-64 bit). I have the same issue with the image preview. I use Typora as external editor. Here is the image link that can’t show properly: ![image-20200215150325992](C:\Users\ren\AppData\Roaming\Typora\typora-user-images\image-20200215150325992.png).

However, the following one can show correctly: <img src="C:\Users\ren\AppData\Roaming\Typora\typora-user-images\image-20200213233354927.png" alt="image-20200213233354927" style="zoom:50%;" />. I guess the possible reason is that Joplin can’t read absolute path by the first way.

Laurent added code that people could also see images when opening a note in an external editor like Typora. I guess the reverse should also be possible somehow.

I agree that this would be very useful, and I was actually a bit surprised that it does not, since the reverse is working perfectly. :slight_smile:

I configured typora to move images I drag in into the “resources” folder (which is where all other Joplin resources end up), resulting in the following markdown:

![c57873](resources/c57873.png)

and the image is displayed.

In Joplin, this gets converted to

![c57873](:/c57873.png)

and Joplin is not able to display the image.

If I then re-open it in the external editor, the markdown is still

![c57873](:/c57873.png)

and the external editor is now also not able to display the image (which makes sense, since this is Joplin syntax).


I use Typora on an up to date Ubuntu.

4 Likes

Joplin cannot magically import files from other applications, so custom logic would need to written. Perhaps we could indeed add some for Typora since it’s commonly used.

6 Likes

Maybe add an option for a custom resource directory for Joplin to watch on top of the default one? That way you wouldn’t necessarily have to set a typora specific setting if joplin can detect the path used.

1 Like

But Typora can move files to Joplin’s resources folder (since it is relative to the file exported for the external editor), so it is already in Joplin, just not properly referenced?

2 Likes

I also encountered such a problem today, but the problem is that even if the file already exists in the resources directory, the image cannot be loaded by using “:”. I don’t know what the reason is.

so basically I can see two scenarios here:

  1. people use some directory other than resources to store image when using other editors. and image is showing correctly back in Joplin, they just want Joplin to auto move/copy the image file to its resources directory to keep everything together.

  2. people use resources in other editors as they hope that Joplin can work with this seamlessly, but the result is no success, Joplin does not recognize this resource file.

I think the reason for both is that the image that added in Joplin has some reference in db, and if we can detect any image not referenced in db and move/copy the image to resources (if they are outside of resources at first place) and register them, then I guess it’s a solution.

It would be great to support this.

I have been waiting for the built-in WYSIWYG editor to be completed in order to migrate from Evernote to Joplin. If one is dealing with attachments all the time it is not a very good experience using an external editor. I believe Typora is widely used by people like me, who like markdown but not split view editing.

5 Likes

I want to share my workaround for not being able to paste image into the typora and manage that image within the scope of joplin resource. What I did is that I configure the typora to use the built-in picgo plugin to automatically upload the images I pasted into it to my github repository. The pasted image is then referred to a github address instead of a local file.

The typora's official guide on how to do this can be found here: https://support.typora.io/Upload-Image/#picgo-core-command-line-opensource

The pros:

  • After I paste image into my joplin md file from typora, I can still view it in joplin.
  • As long as I have back up to my github repo and can host my own git, I don't worry about losing data.

The cons:

  • The images are sent to a public address meaning that everyone can view these images. So a big NO-NO if you have any privacy concern.
  • The images are outside of the joplin resource system, which also makes it impossible to view the image if I don't have an internet connection.

So far I can accept these cons as long as I don't need to switch back to joplin to paste every image. But still, I would like to see an update in the future that joplin will be able to recognize a new image file in its resource directory that is added from an external source, e.g. Typora.

3 Likes

It'd be awesome if this is implemented. I also use Typora, which seems to be a quite popular choice among the Joplin userbase, and also struggle with this.

Anyone here tried to contact Typora about it? It's also in their interest to support various use cases.

1 Like