zgulde / markdown-to-anki

Write anki flashcards in markdown
42 stars 4 forks source link

How do I deal with images? #2

Open hhzl opened 6 years ago

hhzl commented 6 years ago

Are there any plans to deal with images (front of a card)?

zgulde commented 6 years ago

I don't have any plans to have this tool do any special handling of of image tags. However, it looks anki allows a way to deal with this[1][2].

Here's the process that worked for me using the Anki Client on MacOS:

  1. Copy the images/media you want to link to into the anki collections.media directory The filepath for this will depend on your system, see [2] for more details, for me this was: ~/Library/Application Support/Anki2/User 1/collection.media(This will be different for anyone on a Windows box or a mobile app).
  2. Put a normal markdown img link to the file you added in the step above For example, if I copied my-cat.png to the directory described above, I'd add a markdown image that looks like this: ![a picture of my cat](my-cat.png) in my flashcards.md file.
  3. Use markdown-to-anki to convert the file, import into your Anki client, and you should be good to go!

Note that you might have to restart any running instances of anki if you modify anything in the collection.media directory

[1] https://apps.ankiweb.net/docs/manual.html#importing-media [2] https://apps.ankiweb.net/docs/manual.html#files