I am trying to transition to VS Code as my default MD editor. Following Markdown editing with Visual Studio Code article I have figured out most things but for the life of me I cant figure out why media outside of a workspace is not being previewed.
Is this even possible?
In the following example, I have simple main.md
file, inside it three lines:



The first line's file is previewed but the second two lines do not.
Any help would be greatly appreciated!
Apparently this is by design. See Markdown preview cannot display images outside current directory on Linux #64685. Quoting Matt Bierner (one of the VS Code maintainers) from their comment there:
This is by design. Even if you disable markdown security settings, we only allow the preview to load data from inside the current workspace. This helps to somewhat lessen the impact of opening with untrusted content with security settings disabled
See also Markdown image links with relative paths that navigate back - not displayed in Markdown Preview #82021. Quoting again from a comment by Matt Bierner:
For security reasons, the markdown preview will only load resources from the following places:
If you open a workspace/folder, you can load resources from inside those folders.
If you open a single md file, you can load resources that are in the same directory (or child directories) as the md file.
To work with you md files, I suggest you the folder that contains both the md files and the resources they reference