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

Image not shown in preview #234

Open
RudolfJan opened this issue May 14, 2022 · 2 comments
Open

Image not shown in preview #234

RudolfJan opened this issue May 14, 2022 · 2 comments

Comments

@RudolfJan
Copy link

Description

The preview does not show images if they are stored into another part of the folder tree. In the code no error is indicated, stating the image does not exist, but in the preview it is not shown

Steps to reproduce

  1. Create an empty solution with two folders
  • documentation
  • images
  1. Create an md file in documentation with this content:
# Demo image issue

Link to test image:

![Test image](/Images/Test.jpg)
  1. Place an image, named Test.jpg in the images folder
    Expected behavior: [What you expected to happen]

In the previws the image will be shown in the text

Actual behavior: [What actually happened]

The image is not shown, instead an error icon is shown.

Note, in Visual Studio Code this works as expected

Included sample project:
md image preview bug.zip

@RHindsHNTB
Copy link

In the previous edition of the Markdown tool, absolute and relative links used in image paths were observed. To be consistent with Wiki structures in Azure DevOps, I would use a path such as ../.attachments/image.png. This edition of Markdown is not observing the relative paths in the preview window. As a workaround, one may place the image file in the same directory as the MD file and just use the image file name in the path. I have chosen to use the previous edition because of my need to integrate well with the Azure DevOps wiki.

@Miclo
Copy link

Miclo commented Nov 29, 2024

I made an instructioins markdown file with your product (very pleased with it). The instructions file contained images, which are in a subdirectory "Images". Then I copied the lot to a new project, added existing files to the solution and the preview didn't show the images, like RudolfJan stated. If I hover over the image link in the edit panel it shows the image, the preview however doesn't.

Tried to fix it with:

  • restarting VS
  • deleting and re-entering code (link to the images)
  • re-adding the image to the solution

All to no avail. If I open this Instructions.md in Typora, all is perfectly shown. However I prefer working in your VS-extension. Is there a wau this can be fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants