I the development version of Anki (from commit f544bdd04
), if a field contains multiple images, the Check media utility flags all images except the last one wrongly as unused.
For instance, have a note type for Korean with an “image” field, and sometimes I add multiple images. The html is in one example (file linked below):
<img alt="webp image" src="paste_1708544941408.webp">
<img alt="webp image" src="paste_1708544955995.webp">
In this specific case (and for some other cards) Anki reports the first image as unused in the “check media” menu, which resulted in me accidentally deleting the image.
This only happens when compiling Anki from latest main
branch (commit 0018f12
). Disabling addons with --safemode
didn’t help, but I found that this error does not happen in the latest stable release 23.12.1.
Reproduction with MWE:
Here is a collection with a single note as a MWE example to reproduce the bug:
To reproduce, import the collection on anki compiled from main (after f544bdd04
) and click Check media, then you get: Unused: paste_1708544941408.webp
. Check the single note in the card browser, the image is actually used.
Weirdly, if I export my decks (or just the problematic notes) and then import them on the test profile, I cannot reproduce the error. But when I export my collection and import it on the test profile, I can reproduce the issue. So to make the above MWE, I had to import my collection on the test profile and deleted all unrelated notes and media.
Debug Info:
Anki 23.12.1 (0018f126) (src)
Python 3.11.7 Qt 6.6.2 PyQt 6.6.1
Platform: Linux-6.7.5-arch1-1-x86_64-with-glibc2.39