Anki's Auto-Lowercase File Names: A Windows User's

by Jule 51 views
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:

    1. Open the Card Browser
    1. 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)
    1. Go to the Add window -> paste the picture
    1. Observe that the value of the src attribute is automatically converted to full lowercase

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">
    1. Add the note
    1. Tools > Check Media
    1. 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 src attribute 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 src attribute, 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