Anki add-on: Get images from Wikipedia

Image Finder — Anki Add‑on Automatically fill an Image field in your notes by searching Wikipedia/Wikimedia based on a term field. This add‑on looks at a source field in your notes (default: term ), queries Wikipedia (and falls back to Wikimedia Commons), downloads a thumbnail image, saves it into your Anki collection’s media, and inserts an HTML <img> tag into a destination field (default: Image ). Features Adds a menu entry: Tools → Image Finder → Fill Images from Term… Dialog lets you pick: Deck Source field (default: term ) Destination field (default: Image ) Wikipedia language code (default: en ) Maximum image width (default: 512 px) Whether to overwrite or only fill empty image fields Fetches images using Wikipedia API, with fallback to English Wikipedia and Wikimedia Commons Saves images into your media folder with hashed filenames for uniqueness Displays a summary of processed, filled, skipped, and error counts How it works Collect all notes in the chosen deck. For each note, get the source field value ( term ). Query Wikipedia API (in chosen language) to find the most relevant page and its thumbnail. If no match, retry in English Wikipedia. If still no result, query Wikimedia Commons for the first file match. Download the image, sanitize and hash the filename, and write to Anki’s media. Insert <img src="filename.ext"> into the destination field. Skip or overwrite existing images depending on your settings. Requirements Anki 2.1.66+ (Qt6) recommended, though Qt5 versions may work Internet connection (to fetch images) Note type with source and destination fields Installation Copy the image_finder folder into your add‑ons directory: macOS: ~/Library/Application Support/Anki2/addons21/ Restart Anki. Alternatively, zip the contents (not the folder) and install from file: cd image_finder zip -r ../image_finder.zip . -x "*.pyc" -x "__pycache__/*" -x ".*" Usage Open Anki. Go to Tools → Image Finder → Fill Images from Term… Configure your deck, fields, language, and options. Start the process; results will be shown when complete. Notes Skips notes if the source or destination field doesn’t exist. Skips notes if the destination field already has content (unless overwrite is enabled). Errors (e.g., network failures) are logged in the summary.

GitHub repository: frankvalenziano/anki-image-finder