About markdown with linked images

  1. If delete .md file, possible to automatically delete linked local images?
  2. Open .md in 3rd party markdown editor like Typora, cannot show images properly.
  3. Possible to check and find unlinked images?

1. If delete .md file, possible to automatically delete linked local images?

Not without scripting and handling the deletion of the file too.

2. Open .md in 3rd party markdown editor like Typora, cannot show images properly.

This is not possible unless you are using relative links in an indexed location.
Item links are not the files themselves. They are a type of bookmark and as such aren’t resolved by other applications.

3. Possible to check and find unlinked images?

Are you referring to missing links?

Like so…?

1 Like

I guess they’re referring to images that are not linked to, i.e. orphaned (or whatever we call images without links).

Yes, that’s right.

Im not familar with apple scripting, does anyone can help me make it?

How are the images currently linked in your Markdown documents? Via item links, relative links or transclusion?

A very easy solution would be to put your MD file and the related (aka linked to) images in the same group in DT. Then delete the group and everything is gone. No scripting required.

2 Likes

If the images are only linked via item links, a toolbar search kind:image md_incomingItemLinkCount==0 will return all unlinked images.

4 Likes