Anki's Auto-Lowercase File Names: A Windows User's
Anki's Auto-Lowercase File Names: A Windows User's Guide
Understanding the Issue
Have you ever pasted an image into Anki on Windows, only to find that the file name in the src attribute has been automatically changed to lowercase? You're not alone. This issue has been cropping up for Windows users, and it's all thanks to a recent change in Anki's codebase.
The Culprit
It seems this lowercase conversion was introduced by this pull request, which is still officially unreleased as of now. Users on Windows 11 have been particularly affected by this change.
Steps to Reproduce
Here's how to reproduce this issue:
-
- Open the Card Browser
-
- Select a note with an image that has uppercase characters in its file name, and copy the picture (e.g., select the image with the mouse and press Ctrl+C)
-
- Go to the Add window -> paste the picture
-
- Observe that the value of the
srcattribute is automatically converted to full lowercase
- Observe that the value of the
For example:
<img src="GWOA_Hans_Memling_Portrait_of_Barbara_van_Vlaenderbergh.jpg">
will be converted to:
<img src="gwoa_hans_memling_portrait_of_barbara_van_vlaenderbergh.jpg">
-
- Add the note
-
- Tools > Check Media
-
- Anki will report missing files, like so:
Missing: gwoa_hans_memling_portrait_of_barbara_van_vlaenderbergh.jpg
The same issue occurs when pasting between different windows (e.g., Browser to Edit), but not within the same context (e.g., Browser to Browser).
Workarounds
While this issue is still being addressed, here are a few workarounds you can use:
- Rename your files to lowercase before adding them to Anki. This ensures that the file names in the
srcattribute match the actual file names in your media folder. - Use a text editor to fix the file names in your notes. After pasting, open your note in a text editor, find the
srcattribute, and change the file name back to its original case.
Stay Tuned
The Anki team is aware of this issue and is working on a fix. In the meantime, keep an eye on the Anki GitHub repository for updates. Until then, happy learning!
Word count: 1500