Change:
const folder = vscode.workspace.getWorkspaceFolder(base); if (folder) { <del> baseRoots.push(folder.uri); </del> <ins> const workspaceRoots = vscode.workspace.workspaceFolders?.map(folder => folder.uri); if (workspaceRoots) { baseRoots.push(...workspaceRoots); } </ins> } else if (!base.scheme || base.scheme === 'file') { baseRoots.push(vscode.Uri.file(path.dirname(base.fsPath))); }

Discussion:
Issue Type: <bBug</bOpen a Markdown file that includes a properly formatted and accurate image call. Open Preview to Side. Expected: linked image appears. Observed: broken link Same Markdown file displays images properly when built in GitHub. Possibly related: the "Insert Media" button in Gauntlet also doesn't work anymore. If you select it, it opens the dialog to enter alt text--if you enter some and the press ENTER as directed, it just reopens the dialog and does nothing else. VS Code version: Code 1.42.1 (, 2020-02-11T14:46:03.121Z) OS version: WindowsNT ia32 10.0. <details<summarySystem Info</summary </details<details<summaryExtensions (2)</summaryExtensionVersion ------ vscode-sidebar1.1.2 gauntlet2.6.0 </details<!-- generated by issue reporter --
Does this reproduce with all ?
Yes. vv J.O.
Please share example markdown and steps to reproduce the issue
Repro steps are right at the beginning of this very thread: Open a Markdown file that includes a properly formatted and accurate image call. Open Preview to Side. Expected: linked image appears. Observed: broken link Same Markdown file displays images properly when built in GitHub. Example markdown: (That media folder that the image call refers to has been to my workspace. Also, this repros for me with all of the Preview security settings disabled. Also, I have colleagues experiencing the same behavior, so it's not just me.)
What folder are you opening in VS Code? Does it contain both the markdown and image you are trying to include?
No. The Markdown file calling the image file are not in the same folder. We reorganized our files so that all media for the whole repo is in one media folder at the top of the repo. This is why my image call above pops up a couple of levels with ../../ before dropping into the media folder. It's also why I that top media folder to my workspace, hoping that would allow VSCode to find the image file.
Can you share what your project looks like on disk and which specific folders you have opened in VS Code?
! !
Does this work if you open a common root folder for both and the markdown file? (i.e.

opening instead of )
OK that does resolve it. That introduces other problems, since the entire repo has zillions of files in it. So, for example, searching for a string finds thousands and thousands of hits in files one is not working on....
Thanks for testing. I don't think we've supported this previously so marking as a feature request with help wanted
It seems to me that we could add all opened workspace into . Please refer to my commit for the detail. If there is no concern, may I create a pull request?
If you're asking my opinion, it seems fine to me, but I'm no expert on the ins and outs of VSCode, so I don't know what implications there might be arising from your proposal.
Code change looks good (we should get rid of existing call above however). Please submit a pr