How to use local image?

Hello everybody,
I’m new on this forum. I’m working on the Eclipse Papyrus Project. The purpose of this project is to provide a graphical editor for UML. In this context, we are connecting the commonmark (0.21) editor to edit string fields of our UML model. We would like to be able to reference image from the Eclipse Workspace (or at least from the local file system). I already tried several syntaxes without succeed:



<p><img alt="image" src="D:\git\images\apple.jpg" /></p>

using /or \ changes anything

Please, do you know the way to reference local image ?


This has nothing to do with the CommonMark specification really. URLs are specified elsewhere. Such embeds may also be constrained by same origin policies. You should be using relative paths if possible. In the end, it depends on the implementation.

However, the formally correct notation of the address in your example would be file:///D|/git/images/apple.jpg, i.e. the colon replaced by a vertical bar.