I’m trying to write a markdown file in DEVONthink (Pro Office 2.7.7 if it matters) that has images in it. I have the images saved in another group in the same database as the markdown file, and am attempting to use the markdown syntax for images ```
I've tried to get the URL for the image using either right-click Copy Item Link (ex: x-devonthink-item://2A7B1030-1C38-4E86-8E2C-7B7B9A0F1A6F) or Get Info: Path (ex: ./jpg/3/demo.jpg) but neither option seems to work. Rather, the preview within DEVONthink shows a broken image URL.
Any suggestions? I've gone through all the documentation on markdown files in DEVONthink, and it's pretty sparse. There's nothing about using images in markdown that I could find.
Right now only remote URLs (http, https) and file URLs are supported. The path shown in the Info panel is abbreviated in case of internal items and therefore relative to the database package. You might use this script to get the full path:
tell application id "DNtp"
return path of item 1 of (selection as list)
end tell
With the new versions of DTPO and DTTG, are remote URL’s still the only way to link to images stored within Devonthink while editing an external markdown document?
The only workaround would be to use relative links and to index the Markdown documents instead of importing them. That way the relative link is valid outside of DEVONthink.
@BLUEFROG I use the DT item URL in a markdown document. I found out DT and DTTG do not handle PNG files properly. For testing, I created a markdown document with two separate DT item URL to a PNG file and JPEG file. Both file are actually the same picture. Just in different format.
Or is there any special consideration I need to take note when linking a PNG file?
@BLUEFROG I wasn’t clear when I said DT and DTTG do not handle PNG files properly. For some PNG files, like what is in your example, it displays well. For some PNG files, in my example, it does not displayed. The PNG files that has problem usually are the larger picture size or file size.
But for JPEG files, it can handle all picture size or file size.
I take a look at the photos created by iPhone. They are mostly HEIF images.
I would like to take a photo using the iPhone. Create a Markdown note to link the image in DTTG. Thereafter, I can do more writing later in DT of what I captured. In fact, I use the shortcuts in this blog.
How can I do that now that HEIF images is not supported?
As an aside: this is probably not related to DT at all. I think DT uses WebKit to preview markdown. And WebKit does not support HEIC. Though both are (mostly) Apple products.