Commons and Wikidata provide images that can be used in *all* wikis. https://commons.wikimedia.org/wiki/Commons:Project_scope
I wonder if this can somehow be connected to Wikidata's image attribute
This is a very good idea, because it circumvents the problem of autodetection that PageImages has for instance and that takes away the ability of editors to ‘author’ the result.
The steps are:
- fetch and use P18 (preferred rank if multiple P18 are set) where there is no image suggestion at all from PageImages;
- use P18 when PageImages is not so sure of its pick (e.g. small images which might be icons?);
- always prefer Wikidata P18 where available and not deprecated.
Step 1 would already be useful, step 2 could solve multiple weaknesses, step 3 would help resolve most bugs in PageImages.
See also: T91683: Allow editors control of the page image (which can potentially be implemented separately)