- Image:
jpeg
,png
,svg
- Audio:
mp3
- Video:
mp4
,gif
The Anki desktop app source code indicates support for media files with the following file extensions.
Caution
See the following section for some nuances in actual support across Anki platforms.
avif
, gif
, ico
, jpeg
, jpg
, png
, svg
, tif
, tiff
, webp
3gp
, aac
, avi
, flac
, flv
, m4a
, mkv
, mov
, mp3
, mp4
, mpeg
, mpg
, oga
, ogg
, ogv
, ogx
, opus
, spx
, swf
, wav
, webm
The Anki documentation states that the mpv library is used internally to handle media, which should support the formats enumerated in the ffmpeg documentation.
The Anki documentation also says that it will fall back to the mplayer library if necessary, which supports the formats listed here.
Anki client applications exist on several different platforms. In practice, full support fo the formats listed in the source code is not necessarily present across all platforms and contexts.
Extension | Anki Mac | Anki Windows | AnkiWeb | AnkiMobile (iOS) | AnkiDroid |
---|---|---|---|---|---|
avif |
✅ | ✅ | ✅ | ✅ | ? |
gif |
✅ | ✅ | ✅ | ✅ | ? |
ico |
✅ | ✅ | ✅ | ✅ | ? |
jpg , jpeg |
✅ | ✅ | ✅ | ✅ | ? |
png |
✅ | ✅ | ✅ | ✅ | ? |
svg |
✅ | ✅ | ✅ | ✅ | ? |
tif tiff |
❌ | ❌ | ❌ | ✅ | ? |
webp |
✅ | ✅ | ✅ | ✅ | ? |
Extension | Anki Mac | Anki Windows | AnkiWeb | AnkiMobile (iOS) | AnkiDroid |
---|---|---|---|---|---|
3gp |
✅ | ✅ | ❌ | ❌ | ? |
aac |
✅ | ✅ | ❌ | ✅ | ? |
avi |
✅ | ✅ | ❌ | ❌ | ? |
flac |
✅ | ✅ | ❌ | ✅ | ? |
flv |
✅ | ✅ | ❌ | ❌ | ? |
m4a |
✅ | ✅ | ❌ | ✅ | ? |
mkv |
✅ | ✅ | ❌ | ❌ | ? |
mov |
✅ | ✅ | ❌ | ✅* | ? |
mp3 |
✅ | ✅ | ✅ | ✅ | ? |
mp4 |
✅ | ✅ | ❌ | ✅* | ? |
mpeg |
✅ | ✅ | ❌ | ❌ | ? |
mpg |
✅ | ✅ | ❌ | ❌ | ? |
oga |
✅ | ✅ | ❌ | ❌ | ? |
ogg |
✅ | ✅ | ❌ | ❌ | ? |
ogv |
✅ | ✅ | ❌ | ❌ | ? |
ogx |
✅ | ✅ | ❌ | ❌ | ? |
opus |
✅ | ✅ | ❌ | ❌ | ? |
spx |
✅ | ✅ | ❌ | ❌ | ? |
swf |
✅ | ✅ | ❌ | ❌ | ? |
wav |
✅ | ✅ | ❌ | ✅ | ? |
webm |
✅ | ✅ | ❌ | ❌ | ? |
*Loads in <video>
element.
Extension | Anki Mac | Anki Windows | AnkiWeb | AnkiMobile (iOS) | AnkiDroid |
---|---|---|---|---|---|
avi |
✅ | ✅ | ❌ | ❌ | ? |
3gp |
✅ | ✅ | ❌ | ❌ | ? |
flv |
✅ | ✅ | ❌ | ❌ | ? |
gif |
✅ | ✅ | ✅ | ✅ | ? |
mkv |
✅ | ✅ | ❌ | ❌ | ? |
mov |
✅ | ✅ | ❌ | ✅ | ? |
mp4 |
✅ | ✅ | ❌ | ✅ | ? |
mpg mpeg |
✅ | ✅ | ❌ | ❌ | ? |
ogv |
✅ | ✅ | ❌ | ❌ | ? |
swf |
✅ | ✅ | ❌ | ❌ | ? |
webm |
✅ | ✅ | ❌ | ❌ | ? |
-
It's a little lax to define media file types by their file extensions instead of a MIME type reflecting both the container and encoding, but since this is the approach Anki takes, I'll do the same.
-
I'm using the "default" Anki audio / video embedding syntax of
[sound:$filename]
to embed media in the test notes. Different markup like using HTML-native<audio>
or<video>
would probably improve compatibility with AnkiWeb, but in practice I found this creates other issues in the native Anki apps. -
My test files were encoded with out-of-the-box settings in
ffmpeg
, so it's possible that encoding variations could expand or contract the compatibility matrix. For example, I'm surprised thatogg
andwebm
proved so incompatible, so it could be an issue with my encoding technique. -
Tested with Anki desktop apps version 24.06.2 / Qt6, and AnkiWeb with Safari 17.5 / Chrome 126. I don't have an Android device to test AnkiDroid. If anyone does, and wants to contribute their findings, feel free to send a PR.