Anki tells me I am missing images even though I have them in my collections.media folder.
I think its because the filenames of these images either have spaces which comes up as β%20β in html but not in the image filename or bec the image type is JPG vs jpeg or png vs PNG
Here are the images that show up for me as missing right after I unsubscribed and resubscribed
This one should be fixed now, this is one of the creative common image glitches, i just screenshotted the image and put it in and reset local changes and I can see it now
This one is Ahmed Afifis image I accepted this morning, its not syncing for some reason, even after adding AnkiHub_ImageReady::Extra (I thought that might be the issue but nothing happened)
Running this code in the debug console should fix the space issue:
from aqt import mw
deck = 'AnKing Overhaul for Step 1 & 2'
updated_notes = set()
for nid in mw.col.find_notes(f'"deck:{deck}"'):
note = mw.col.get_note(nid)
for i in range(len(note.fields)):
updated_contents = mw.col.media.escape_media_filenames(note.fields[i], True)
if note.fields[i] != updated_contents:
note.fields[i] = updated_contents
updated_notes.add(note)
mw.col.update_notes(updated_notes)
print(f'updated {len(updated_notes)} notes')
Maybe itβs worth applying this to the whole deck. It only made Anki report 7 less missing files for me in a fresh installation of the deck though.
Notice how the filenames only differ by the extension for the ones that it says are not being used in any card and 2 of the ones that they say are missing