Missing media on AnkiWeb after restoring files locally

Hello,

I’m experiencing a media synchronization issue between Anki Desktop (Mac), AnkiWeb, and AnkiMobile (iPad/iPhone).

Initially, 43 image files were missing on my Mac. I restored them using the “Restore Deleted Files” option under Tools > Check Media.

Now all my images display correctly on my Mac, and only one apparently malformed media reference remains.

However:

  • AnkiWeb still does not display several of these images.

  • My iPad reports 86 missing media files.

  • Restoring deleted files on the iPad temporarily reduced the number to 51, but after syncing, it returned to 86.

  • Media synchronization reports “complete”.

  • Media synchronization is enabled on all devices.

  • I have already tried logging out and back into AnkiWeb on my Mac.

I have backed up my full collection and media folder.

Could you please check whether these media files were deleted from AnkiWeb and whether they can be restored server-side?

Thank you!

  1. The only way Anki would move anything to that folder is if you used the Delete Unused Media option. Is that what happened?
  1. The fact that it’s exactly double, makes me think this is a filename issue. Have you compared what is currently in your “Missing” and “Deleted” lists? Do you see similar filenames on both, that differ by capitalization, spacing, special characters, etc.?

  2. Can you provide me the names of some of the files you’re trying to recover, so I can check your account? [I can see the account connected to the email address you used to post here.]

Thank you very much for your help!

1. Regarding “Delete Unused Media”:

I’m fairly certain that I have never used the “Delete Unused Media” option.

I’m not a particularly advanced Anki user. I mainly use it to create and review flashcards, and I generally don’t change settings or use maintenance tools unless I have a specific reason to do so.

My usual workflow is to take screenshots of my XMind mind maps, drag them directly into the “Back” field of my Anki cards, and then move the original screenshots to my Mac’s Trash.

As far as I understand, this should not affect the copies stored in Anki’s media folder.

2. Regarding the missing files:

Initially, 43 media files were missing on my Mac. After using “Restore Deleted Files”, only one missing reference remained (><img alt=).

On my iPad, 86 files were missing. Restoring deleted files temporarily reduced this number to 51, but after syncing it returned to 86.

I haven’t yet compared the “Missing” and “Deleted” filenames for differences in capitalization, spaces, or special characters.

3. Some examples of missing filenames on my iPad:

  • Screenshot 2026-09-21 alle 20.06.59.png

  • Screenshot 2026-09-22 alle 11.08.55.png

  • Screenshot 2026-09-29 alle 15.58.39.png

  • Screenshot 2026-10-03 alle 17.44.31.png

These images are now visible on my Mac, but remain missing on AnkiWeb and my iPad.

I have created backups of both my collection and my Mac’s media folder.

Could you please check whether these files are present on my AnkiWeb account (the email is the same as here) and whether there might be a filename-related issue?

Thank you again for your assistance!

For this one, I found a deleted file with that name [which restoring media on the server might bring back], but there’s also an existing file with the name in lowercase. Is that the image you’re looking for?

  • Screenshot 2026-09-21 alle 20.06.59.png – screenshot 2026-09-21 alle 20.06.59.png

For these, there’s no deleted file with that name, but there is an existing file with the name in lowercase.

  • screenshot 2026-09-22 alle 11.08.55.png
  • screenshot 2026-09-29 alle 15.58.39.png
  • screenshot 2026-10-03 alle 17.44.31.png

This appears to be the case-sensitive filenames issue that I thought it might be. Since you have so few of these, your easiest option might be to update the filenames or references in the fields [click < > to open the HTML view], so that they match.

I can also restore the deleted images on the server side – there are 55 files deleted in the past week. But it might not be necessary if you are able to fix all of these. Please confirm if you want me to proceed with that. [The files will become unrecoverable approximately 4 weeks after they were deleted, so don’t wait too long if you want me to do that.]


For most users, the next step is to figure out if there’s somewhere in your workflow that Anki isn’t properly converting – or isn’t able to properly convert – the filename and field reference to lowercase. It’s not clear to me yet whether this is an issue in Anki, or an issue in other tools.

See these threads for more background. –

Thank you very much for investigating this!

Your explanation about case-sensitive filenames makes sense and could explain why the images are visible on my Mac but missing on AnkiWeb and my iPad.

Yes, please proceed with restoring the 55 deleted media files on the server. I would prefer to recover them before they become permanently unavailable.

I have already backed up my Anki collection and the entire media folder on my Mac.

After the server-side restoration, could you please let me know the safest way to synchronize my devices and correct any remaining filename mismatches?

For now, I’ve temporarily disabled automatic synchronization on my Mac to preserve the recovered media.

Thank you again for your assistance!

I’ve restored those files. You should re-enable media syncing and when you sync, that will prompt a re-scan of all your media files.

After you’ve re-synced the media to all of your devices, and your devices are fully in sync – you can use Tools > Check Media > Tag Missing to apply the missing-media tag to the notes that have a mis-match. Then search them up and fix the situation in the HTML view. When you’re done, remove the tag, and running Check Media again should show no missing files. Then you can use Delete Unused Media to get rid of the duplicate wrong-case files.

Hi Danika,

First of all, thank you again for your help, especially for restoring the deleted media files on AnkiWeb.

I have some great news: I finally managed to resolve all the missing media issues! Check Media now reports 0 missing files on both my Mac and iPad, and the images are displaying correctly on AnkiWeb as well.

During troubleshooting, I discovered some important details that might help identify a possible bug.

1. Case-sensitive filename mismatches

Many images had different capitalization in their HTML references compared with the actual filenames in collection.media.

For example:

  • HTML: Screenshot 2026-10-10 alle 19.05.17.png
  • Actual file: screenshot 2026-10-10 alle 19.05.17.png

I also found the opposite situation, where the HTML used screenshot but the actual file started with Screenshot.

The images appeared correctly on my Mac, but were missing on AnkiWeb and AnkiMobile. Correcting only the capitalization immediately fixed them after synchronization.

2. Reproducing the issue

I tested this with an image named PROVA_ANKI_02.png.

After inserting it into Anki using the attachment button, the stored filename and HTML reference were lowercase (prova_anki_02.png).

When I reused the original image in another note by dragging it from Finder, the HTML reference became PROVA_ANKI_02.png, while the existing media file remained lowercase.

I also found case mismatches in other images that had originally been inserted using Anki’s attachment button, so the problem may not be limited to drag-and-drop.

3. Image Occlusion notes were also affected

Initially, I corrected filenames using Find and Replace in the Back field.

However, some images remained missing because they were referenced in the Image field of Image Occlusion notes.

Repeating the targeted, case-sensitive replacements across all fields resolved those references too.

4. Final results

At one point, AnkiMobile reported 90 missing files.

By comparing the missing filenames with the actual files in collection.media, I identified the capitalization mismatches and corrected them using targeted regular-expression replacements.

The number of missing files went from 90 to 17, then to 2, and finally to 0.

The last two issues involved my test image and a separate malformed HTML fragment (><img alt=), which I repaired manually. I cannot confirm whether the malformed HTML was caused by the same bug.

5. My Anki environment

Anki 26.09.2 (bb0dd6d1) (ao)

Python 3.13.15

Qt 6.11.2 / PyQt 6.11.0

Platform: macOS-27.0.1-arm64-arm-64bit-Mach-O

Active add-ons:

  • AMBOSS (0amboss_addon)
  • Colorful Tags / Hierarchical Tags (594329229)
  • Customize Keyboard Shortcuts (24411424)
  • DeepL Translator (972129549)
  • Enhance Main Window (877182321)
  • Image Occlusion Enhanced (1374772155)
  • Review Heatmap (1771074083)
  • TagSelectorV2 (1022577188)

I have not yet tested whether the issue occurs with add-ons disabled, so I cannot rule out an add-on interaction.

Would you be able to bring these findings to the attention of the Anki developers, or advise me on the best place to report them?

I would be happy to provide further details or perform additional tests if needed.

Thank you again for your time and support. I really appreciate it!

I was able to reproduce the issue described above in item #2 using both methods:

  • Drag-and-drop from Finder
  • Editor attachment button to select the file

I think this is another instance of the same bug that occurs by a 3rd method:

  • Copy and paste from the Finder

I’m using Anki 26.09.3 on macOS Golden Gate 27.0.1, with no add-ons.


Edit: Added: I think that the bug was reported as Issue #5681 and might have been already fixed by PR #5683. The fix should be deployed in the next Anki release.