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

Images are in markdown do not show in Anki app #100

Open
rleyvasal opened this issue Feb 14, 2023 · 6 comments
Open

Images are in markdown do not show in Anki app #100

rleyvasal opened this issue Feb 14, 2023 · 6 comments

Comments

@rleyvasal
Copy link

Image entered in markdown does not appear in Anki app after entering code below.

The card and Cloze are showing correctly but the image does not show in Anki app.

![image](/home/rls/Downloads/anki_md/2x2.png)

Note: I have also tried:

![image](./2x2.png)

anki_w_image

anki_w_image_2

@jasonwilliams
Copy link
Owner

Could you create a test case repo for us to look at? Thanks

@rleyvasal
Copy link
Author

rleyvasal commented Feb 14, 2023

how to do a test case repo?

@jasonwilliams
Copy link
Owner

The screenshot you have put that in a repo and write steps for me to see the same issue

@rleyvasal
Copy link
Author

https://github.com/rleyvasal/vscode_anki_repo/blob/main/README.md

.md file and image is located in the repo,

Anki for VSCode version:
Last updated
2/12/2023, 12:31:32

Anki version:
Version ⁨2.1.57 (6b7d372c)⁩
Python 3.9.15 Qt 6.4.2 PyQt 6.4.0

OS Version:
Ubuntu 22.04

@jasonwilliams
Copy link
Owner

I have a feeling this may be because you're using absolute paths. Could you try doing the same with a relative path from the markdown file?

Issue here:
https://github.com/jasonwilliams/anki/blob/main/src/markdown/Serializer.ts#L139-L140

@rleyvasal
Copy link
Author

rleyvasal commented Feb 17, 2023

Absolute and relative paths both work.

The issue happens only when Cloze is used.

This doesn't show the image

## 2 x 2 =  {{c1::4}}

![](2x2.png)

This shows the image

## 3 x 3 = 9

![](2x2.png)

Note: Adding image with Cloze, works in the Anki app
anki_image_w_cloze

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

2 participants