I keep encountering the following warning when using Tool > Check Media in Anki:
Anki cannot detect used files when you use {{Field}} references in media/LaTeX tags. The media/LaTeX tags should be placed on individual notes instead.
Referencing templates:
Vocabulary: Card 1 (Front Template)
Vocabulary: Card 1 (Back Template)
However, I’ve thoroughly checked the templates under Browse > Notes > Manage Note Types > Options, and I can’t find any instances of {{Field}} in the templates.
Could someone please help me understand why this warning is appearing and how I can resolve it? Any guidance would be greatly appreciated.
In that message {{Field}} is standing in for any field replacement that is in a media or LaTeX tag on your template. So, looking at those 2 templates, do you have anything like that? Field Replacements - Anki Manual
You wouldn’t have to go through several thousand cards, as the issue is only in the template. You just need to change the two templates and your problem will be solved.
I’m interested in learning how to resolve this issue directly within the template, rather than manually updating the image field for every card that uses an image.
Use note:Vocabulary to get all notes of this notetype. Select all of them. Use “Find and Relpace”, select the Field as IMAGE, tick regular expressions and have the tick for apply for only selected selected cards. Then in search use (.*) and in replace use src=“$1”.
Before you do all this, ensure you have backup so that you can revert back incase of a small mistake.
This is incredible, you just saved me days of work! It’s already finished in less than a minute. Thank you so much! It’s definitely time to make another donation to this great project.
A great resource to learn more on how RegEx works is https://regexr.com. This will certainly be useful in a lot of things, even inside Anki (for easier searching).