If I want to include an image in a Markdown document, how do I reference the correct path? Let’s say that I create a Group to collect together all the pieces—both the document and images that it references. The following Markdown code does not work:

```Apparently, the image file is not located in the same directory as the Markdown document itself, even if I put them in the same Group. Now, I [i]can[/i] cheat and look up the path using the Info dialog, and by trial and error, I discovered that I can change the image path to something like ```

```and that works. But, come on, I shouldn't have to use trial and error to discover the right path to use.
Is there an easier way? I'm probably missing something obvious ...
Hey Bluefrog, can you clarify what “works as expected”, exactly? Are you using the ordinary file pathname approach that I described, or the Mac-specific “x-devonthink-item” URL?
Just to demonstrate what happens in my enviornment: I’d be happy to try different test cases if that would help debug why it fails for me and works for you.
@Brookter, thanks for that. That’s interesting that the link works in that context—I didn’t expect those links to work in this situation, but I tried it and it does indeed. Unfortunately, it doesn’t seem to work for Markdown processors that are not DEVONthink (which is part of the reason I’m using Markdown in the first place), but this may be useful for some cases. Good to know, anyway.
So I tried it, and you’re right, that does work, within DEVONthink. It doesn’t help outside of DEVONthink, but it’s interesting and probably faster to type than to use the item link.
The path to the .png file is relative to your document, but it exists only outside of DEVONthink. To make it work inside DEVONthink, you would need to find the path to the same file inside DEVONthink and update the path used in the image reference, after you’ve imported everything into DEVONthink.
(Maybe this was unclear, but when people were talking about relative paths upthread, it was assumed to be relative paths inside of a DEVONthink group/folder structure.)
Not sure this is my case though, as I am using indexing so files sit in Finder on the Mac. The files do not exist inside DT3. And the links do exists and work well in all other MD editors apart from DT3 …
I’m trying to be “cheeky”, but perhaps the solution is to use one of “all the other MD editors”? If the image not in DEVONthink and your link doesn’t include the link to the image, then how can it work?
And the md doc must be inside DT? As in your example? Or it is expected to work with indexed md file as well? My use-case is only indexed files as they are processed by some other tools but I am trying to be able to see the result inside DT e.g. while searching for something.
I tried with an a file inside DT as well and corrected the link but still had no luck:
I was under the impression that your “indexed images.md” is not indexed but lives inside DT. All indexed files have a small finder icon. It seems to me that in your example your md file is indeed not indexed as it lacks the icon. But as I say, I tried this option as well and it did not fix the problem.
The files in question in my example (all located inside one indexed folder):
I have this problem with DT rendering with all my indexed md files with images so there seems to be some systematic issue not related to this particular file.
Just curious, what his the full path to the folder, which I assume is on your MacOS file system? Or is this a “20201226-Team topologies.assets/” somewhere in DEVONthink?
Edit: and where relative (MacOSX file system and/or DEVONthink) to the file in which this text is located?