PageImages should allow specifying the page image using a magic word (or maybe in image markup). It should be required that to be the lede, it actually be visible in the article.
For example, the first image of the article may be in the second section. That image may be appropriate to accompany the second section. However, there may be a more appropriate lead image (representing the topic as a whole) later in the article.
{T90914} is about other markup options for images.
== User story
As an editor, I want to be able to select the page image for pages that do not have an assigned image
As an editor, I want to be able to select the page image for pages where the current image is inappropriate
== Background
Last year, we made a change to page images that restricted page images from selecting any image that was not in the lead section of an article (https://phabricator.wikimedia.org/T152115). This change was made because often images that were in latter sections were displayed out of context and were not a good representation of the entire article. We would like to give editors the ability to select page images from the remainder of the images within the page to increase the coverage of pages with page images. In addition, there might still be cases where images appearing later in the page might be more appropriate as page images than the image selected from the lead section. This overwrite would give editors control over selecting these images.
== Acceptance criteria
- Create markup that allows editors to assign any image present on the page as the page image
- If multiple images are assigned, the first instance will be the image used
- If the image assigned is no-longer present on the page, we must default back to selecting the image as the first image from the lead section or infobox