How to include an image in a Markdown document?

This is HTML. You can always include it in MD and it should render in the HTML view of the MD file.

1 Like

Is this is part of a .textbundle file?

Sure but this proves DT can recognise the file path and the image, right? That was my point.

No - it is not.

No, it does not prove that DT „recognizes“ the image or the path. DT converts MD to HTML and passes HTML through unchanged. The HTML, including your img element, is than rendered by a Webview component, basically a Mini-Safari. DT probably does not even notice that there’s an img element.

Thanks for clarification.

Any idea on how to troubleshoot and/or solve the lack of img rendering in md files?


the folder with images is on the MacOs file system it is not in DT as I use indexing with this Database.

This folder with the images is located inside of the same folder relative to the file: i.e. the markdown file and the folder with with images are in the same top folder.

For example:


File-which does not pointing to “Folder with images”.

Folder with images

Why do you think this matter to DT where on the filesystem the images are in this case?
Are you able to successfully render images in md on your end?

I do as I recommended to you earlier. Use a full featured MD tool that facilitates use of images and only keep final product (PDF) in DEVONthink.

My questions were only to maybe help you thru debugging your own problem which I think is all about where the images are re the software that renders the MD code. If not helpful, of course ignore me.

I did one more experiment and created a similar folder with same name “img” as in your example:

In this case the image was successfully rendered by DT3.

Further I changed the name of the folder to name “20201226-Teamtopologies.assets” removing a space and that was also successfully rendered.

I tried encoding it with %20 as per but it did not help.

It sounds like a space " " in the folder name is not accepted by DT in this case?

Cheers. In this case I prefer to keep them in the raw, simple form i.e. as MD/TXT not PDF. So really want to be able to render images with DT.

But as you say, I ended up using Typora just for the convenience of drag and dropping the image into the file (wish this feature were available in DT!).

You can drag and drop images into a Markdown document in DEVONthink. You drop it into the source and a Markdown link is created.

Also, this worked as expected…


:slight_smile: as per usual the solution was very obvious. Perfect! Drag and dropping worked. And DT has created a link using 20%.

Very cool! Thanks @BLUEFROG!

P.S. One interesting idea for one of your blogs would be to demonstrate drag and drop for MD files … not sure how well known this feature in DT3 is but it is fab.

You’re welcome.

Just re-visiting this thread. It would be fantastic to have “typora-like” feature in DT3 which would allow cmd+C/cmd+V of images directly into with a pre-defined folder structure ala Typora:

This default setting automatically creates a folder along the markdown file with e.g. the same name of the markdown file (as configured in my case, but other options are possible) and puts all images in there. Must be configured once and can be used everywhere. Very convenient when working with images coming as a screenshot from internet(s) and not located in DT3 or on local mac already.
That is the one of the few feature which still bring me to external md editor :slight_smile:

Any chances to see it on the endless feature list of DT3?


Chances? The world is full of possibilities. :wink:

1 Like

I also use Typora for this, and your post got me thinking… maybe this is scriptable in keyboard maestro and/or AppleScript, at least on indexed databases.

I realized that the space is the problem after seeing your thread… Turns out that everything is find after removing the space in path.

Having a script being able to execute that for a file could be an option indeed.
I guess you would need to:

  • check filename of main md file
  • create folder with filename.asset
  • in case of any cmd+v/pulling of an image into the file, put an image into the folder, create an appropriate md link in the main file
    I still advocate for native support in DT3, with the recent superb implementation around multiple md features, this is really one of a few blocking a full blown usage directly in DT3 ala Zettelkasten/Notes where one tends to use screenshots a lot. I use Typora just for that, but cannot finish my notes there as Typora does not know about all my other files and cannot build the wikilnks …

Note: We are not implementing features to specifically support Zettelkasten.

Zettelkasten or not, what we are concerned with a simplified flow for inserting images into the markdown file whereby the editor creates a folder for them and links images appropriately in the main md file by defining “when insert” behaviour.