I would like to report a bug related to the “Check Media” feature in Anki. Specifically, it appears that when image or audio files are referenced in cards using URL-encoded filenames (percent-encoded UTF-8, such as %E3%82%82%E3%81%A3%E3%81%B1%E3%82%89_%E3%83%8D%E3%82%B3%E3%83%91%E3%83%A9.jpg), Anki’s media check fails to correctly associate them with their corresponding files in the media folder (e.g., もっぱら_ネコパラ.jpg).
As a result:
Anki reports such files as “missing” in the “used in cards but not found in media folder” section.
Simultaneously, it reports the actual UTF-8 named file as “unused”, even though it is in use.
This could lead to accidental deletion of necessary media files by users following the check’s suggestions.
This appears to be a mismatch between how filenames are encoded in the note fields (HTML source using URL encoding) and how Anki scans for usage.
Steps to Reproduce:
Create a card and insert an image tag like <img src="%E3%82%82%E3%81%A3%E3%81%B1%E3%82%89_%E3%83%8D%E3%82%B3%E3%83%91%E3%83%A9.jpg">
Place the file もっぱら_ネコパラ.jpg in the collection.media folder.
Run Tools > Check Media.
Expected behavior:
The media check should decode the percent-encoded references and recognize the file as “in use.”
Actual behavior:
The file is reported as both “missing” and “unused.”
Would it be possible to improve Anki’s media checker so it accounts for percent-encoded references in HTML? This would help prevent incorrect deletions and confusion, especially among users who generate cards programmatically or use external tools.
Thank you again for your hard work on maintaining such an excellent tool for learners worldwide. I look forward to hearing your thoughts.