reuseman / flashcards-obsidian

🎴 An Anki plugin for Obsidian.md
MIT License
872 stars 86 forks source link

1.6.5 update -> no pictures ;( #150

Open xverbatim1971 opened 1 year ago

xverbatim1971 commented 1 year ago

Hi,

despite the update i have no pictures in anki. my links of the images are in this format,

![](../../Anhänge/th-1944952852.jpg) don't know if it helps anything?

Obsidian Version 1.0 - Windows 10 many greetings Thomas

Unbenannt

in Anki ->

Unbenannt

github-actions[bot] commented 1 year ago

Thank you for taking the time to report the issue and help me to make the project better! 🙂

bytewife commented 1 year ago

Hey @xverbatim1971

Using the setup in your pictures I am able to see embedded images in my flashcards. Given that the fix update just happened, have you updated the plugin? If so we can continue with debugging

xverbatim1971 commented 1 year ago

Hi,

yes, i have everything up to date. i use the free version of obsidian

obsidian version

i created another deck with an image frage obsidian

the problem remains, no image is visible in anki :( frage

xverbatim1971 commented 1 year ago

I was able to isolate the problem. so the image is not displayed when i have the attachments in another folder. If I have the images in the vault main folder, it works, then anki shows the images. lösung1

doesn´t work

gehtnicht

glitchlover commented 1 year ago

@xverbatim1971 for now please add a space after yaml. I am having the same problem. We will resolve this issue as soon as possible

wawa-dan commented 1 year ago

Hello, @glitchlover what do you mean by adding a space after yaml? don't see any reference to yaml in the issue.

@xverbatim1971, on which OS do you work ? can you please both in Anki and Obsidian show the source of the image link (in anki you should have a button to see the html). Another question, how do you add the image in Obsidian ? when I paste an image from the clipboard, it add the media in the configured folder, but does not need any slash in the path. Looks obsidian search in the configure path and so do not need any relative path. Or did you have manually do the link with relative path ?

Looks like on anki side, all media are put in the same folder, and it didn't like that we send it slash in the file name

xverbatim1971 commented 1 year ago

hi, thanks for the feedback. I work with windows 10 - 64 bit.

sorry at the moment I do not want to touch my anki collection ... i am now completely away from the anki plugin because it was too vulnerable. i hope it will soon be stable and not so vulnerable :-)

i took relative paths for the images and set them under settings in obsidian. if i take absolute paths here, no pictures are shown to me when i work with the notes and the software typora. there i don't see any pictures otherwise - so far it only worked like this.

thanks for the work, many greetings thomas

Translated with www.DeepL.com/Translator (free version)

houcheng commented 1 year ago

Hi all, I've do some tests:

LucaMertens commented 1 year ago

To fix the issue with relative image links that point to a subdirectory, it could be sufficient to modify the markdownImageLinks regex to only extract the file name of the path:

from !\[\]\((.*\.(?:png|jpg|jpeg|gif|bmp|svg|tiff)).*?\) to !\[\]\((?:.*\/)?(.*\.(?:png|jpg|jpeg|gif|bmp|svg|tiff)).*?\) https://regex101.com/r/cG6of6/1

Apparently, all Anki images are put into the same folder, so the files have to be referenced directly.