Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown preview no longer shows images with root relative path after update to 1.40.0 #84728

Closed
NathanielACollier opened this issue Nov 13, 2019 · 11 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug markdown Markdown support issues verified Verification succeeded windows VS Code on Windows issues
Milestone

Comments

@NathanielACollier
Copy link

NathanielACollier commented Nov 13, 2019

Markdown preview of images using this syntax ![](/assets/2019-10-24_07_56_26.png) no longer works after updating to 1.40.0.

/assets/ is a folder in the root of the folder open in vscode.

  • VSCode Version: 1.40.0, 1.40.1
  • OS Version: Windows 10 1903

Steps to Reproduce:

  1. git clone https://github.com/NathanielACollier/issues_vscode_1_40_0_markdownPreviewRootRelativeImg
  2. cd issues_vscode_1_40_0_markdownPreviewRootRelativeImg
  3. code .
  4. Image doesn't display in readme.md

Does this issue occur when all extensions are disabled?: Yes/No
Yes

11/14/2019 11:15 AM - Reformatted

@vscodebot
Copy link

vscodebot bot commented Nov 13, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@mjbvz mjbvz self-assigned this Nov 13, 2019
@mjbvz
Copy link
Collaborator

mjbvz commented Nov 13, 2019

Works for me. Please fill out the issue template and provide steps to reproduce this

/needsMoreInfo

@vscodebot vscodebot bot added the info-needed Issue requires more information from poster label Nov 13, 2019
@vscodebot
Copy link

vscodebot bot commented Nov 13, 2019

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

Happy Coding!

@NathanielACollier
Copy link
Author

NathanielACollier commented Nov 13, 2019

I'll work on the issue template. This is the minimal folder that would reproduce the problem. The problem is still present in 1.40.1.
https://github.com/NathanielACollier/issues_vscode_1_40_0_markdownPreviewRootRelativeImg

We've seen the problem on every windows 10 1903 computer we've tried it on. I've tried the repo on ubuntu 19.10 and it's works fine. I've tried it on macos 10.14.6 and it works.

@pingu8007
Copy link

I got the same issue on Windows 10 1903, and every time I open the preview page I got following lines in console:

[Embedded Page] Not allowed to load local resource: file:///D:/%5Copt%5CDocuments%5Cwww%5Cassets%5C2019%5CIMG_20191003_184153.jpg
  ERR Invalid regular expression: /^image\\jpeg;label:IMG_20191003_184153\.jpg;description:HEAD;size:313833;base64...

image

@inliquid
Copy link

Same for me;
изображение

Windows 10 1903 / VS Code 1.40.1

@NathanielACollier
Copy link
Author

I found out today that the Markdown Preview Enhanced extension still functions correctly. So if your on windows and use vscode for markdown you can install it and your images with root folder paths should function again.

@NewFuture
Copy link
Member

NewFuture commented Nov 29, 2019

@mjbvz
Still reproduce in VScode 14.0.2 on Windows 10.

@NewFuture
Copy link
Member

NewFuture commented Nov 29, 2019

As @pingu8007 mentioned, the reason is, that it can not load local images in schema such as file:///D:/....
It may be a problem with security policies.

And #85820 is a workaround to fix this bug

@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug markdown Markdown support issues windows VS Code on Windows issues and removed info-needed Issue requires more information from poster labels Dec 3, 2019
@mjbvz mjbvz added this to the November 2019 milestone Dec 3, 2019
@mjbvz mjbvz closed this as completed in 9785578 Dec 3, 2019
@connor4312 connor4312 added the verified Verification succeeded label Dec 5, 2019
@P0oOOOo0YA
Copy link

Same here on Linux it seems this feature is broken in all major operating systems. Absoulte path, Relative path, Absolute with file protocol to make it a valid URI, no matter what i do it doesn't load images. :(

@pingu8007
Copy link

pingu8007 commented Dec 25, 2019

Same here on Linux it seems this feature is broken in all major operating systems. Absoulte path, Relative path, Absolute with file protocol to make it a valid URI, no matter what i do it doesn't load images. :(

It's strange. Did your update to latest version?
It should be fixed in last few updates and I can confirm it's works in vscode 1.41.1

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug markdown Markdown support issues verified Verification succeeded windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

7 participants