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

MarkdownString cannot render webp image #144188

Closed
Sean10 opened this issue Mar 1, 2022 · 6 comments
Closed

MarkdownString cannot render webp image #144188

Sean10 opened this issue Mar 1, 2022 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@Sean10
Copy link

Sean10 commented Mar 1, 2022

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

  • VS Code Version: 1.64.0
  • OS Version: mac 10.15.7

Steps to Reproduce:

  1. preview this file
const md = new vscode.MarkdownString('![](./leveldb2.webp)')
  1. not work.
@Sean10
Copy link
Author

Sean10 commented Mar 1, 2022

Maybe adding the suffix here could solve this problem?

private readonly validExtensions = new Set(['.svg', '.png', '.jpg', '.jpeg', '.gif', '.bmp']);

@mjbvz
Copy link
Contributor

mjbvz commented Mar 1, 2022

Do they render in other places in vscode, such as the markdown preview?

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Mar 1, 2022
@Sean10
Copy link
Author

Sean10 commented Mar 2, 2022

Do they render in other places in vscode, such as the markdown preview?

In yzhang-gh/vscode-markdown: Markdown All in One, it could work. webp is rendered correctly.

Maybe my usage is wrong. I will try it.

@Sean10
Copy link
Author

Sean10 commented Mar 2, 2022

Do they render in other places in vscode, such as the markdown preview?

command markdown.showPreview use MarkdownIt to render the image, while MarkdownString use the different ways to render image.

But MarkdownString is the exposed API, can you support this ?

@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Mar 2, 2022
@mjbvz mjbvz added this to the March 2022 milestone Mar 2, 2022
@mjbvz mjbvz closed this as completed in a7e487b Mar 2, 2022
@mjbvz mjbvz added the author-verification-requested Issues potentially verifiable by issue author label Mar 23, 2022
@Sean10
Copy link
Author

Sean10 commented Mar 24, 2022

/verified

@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2022
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 insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants
@Sean10 @mjbvz and others