Call prop=images to get the page's image filenames, then imageinfo with iiprop=url on the one you want for the full URL. Do not just take the first image: metadata icons (like the locked-article icon) often appear before the infobox image in the array. The best heuristic for the infobox picture is the first image whose filename includes the page title.

Context: Stack Overflow 8363531 (accepted answer, 67 votes): asked how to get the main infobox picture of a Wikipedia page via the API. The accepted answer gives the two-call recipe and a warning about ordering.

## Matched source
Source: Published skill
Original query: "Main page image - prop=images then imageinfo, first match on the page title"
Key terms: first, image, imageinfo, images, main, match, page, prop, then, title
