Community Wishlist Survey 2022/Editing/Select preview image

Select preview image

  • Problem: Page Previews often default to showing images that are in templates. For example, links to w:Civil war show the image from w:Template:Revolution sidebar which is used on the w:Civil war article.
  • Proposed solution: Allow editors to choose a certain image within the article, not necessarily from within the lead section, to be displayed as the preview image. This could be done with a magic word or in the image syntax itself.
  • Who would benefit: Everyone who uses page previews when reading Wikipedia articles (presumably most desktop users).
  • More comments: Information on how images are automatically selected today can be found at mw:Special:MyLanguage/Extension:PageImages#image-choice.
  • Phabricator tickets: phab:T91683
  • Proposer: Toadspike (talk) 18:30, 10 January 2022 (UTC)


Here is an example of the problem, seen when hovering over Civil war on Revolution:

Toadspike (talk) 18:43, 10 January 2022 (UTC)

  • I frequently see this issue confuse people in real life and am very happy to see it being addressed. Could the problem be fixed more speedily just by excluding all transcluded images from previews? It seems like manually selecting previews for every article would be a major effort in itself. I would also like to point out that the same image appears in mobile search, so the scope of benefit is even broader than just desktop users. --SmallJarsWithGreenLabels (talk) 20:05, 10 January 2022 (UTC)
    Maybe not excluding transcluded images, but giving them lower priority. Ignacio Rodríguez (talk) 20:27, 10 January 2022 (UTC)
    Is it possible to target sidebars specifically? I realise that disregarding all template images would also rule out relevant ones contained in infoboxes. SmallJarsWithGreenLabels (talk) 20:56, 10 January 2022 (UTC)
    The "transcluded image" is exactly what the infobox displays. If you exclude it or lower the priority, then significantly more articles will be broken than fixed. — putnik 21:59, 10 January 2022 (UTC)
    However, removing misleading images is more important than maintaining good ones. SmallJarsWithGreenLabels (talk) 22:28, 10 January 2022 (UTC)
    The problem is that by removing (or lowering the priority) images from the infoboxes of most articles, you will get a second image in these articles as the main one. And in a very large (much more than there are now) number of cases, there will be incorrect. — putnik 22:58, 10 January 2022 (UTC)
  • The problem is that apparently the first picture in the article is chosen. When it is an info box, it is not a problem, but templates for series in pages that don't have info boxes are where the image is most disappointing. However, I just checked the preview for w:Anti-communism fearing that it had an sickle and hammer, and it has no image, I don't know how. A template like "PreviewImage" around a File:aa.jpg could prioritize it over the template images. --Error (talk) 17:50, 11 January 2022 (UTC)
    It doesn't have an image in the lead section (before the first heading), so it doesn't have a page image. More information on Jdlrobson (talk) 21:47, 17 February 2022 (UTC)

I think people participating in the discussion would benefit from knowing the rules for image selection: mw:Extension:PageImages#Image_choice. So if the request is not chosen, you can still ask for the algorithm to be customized on your wiki. Correctly populating MediaWiki:Pageimages-denylist helps a log - for instance ro:MediaWiki:Pageimages-denylist has cleared tens of thousands of inappropriate images from being chosen.--Strainu (talk) 07:45, 12 January 2022 (UTC)

  • I think image choices when previewing the article should be chosen, as some article have the main image not in the first image of the text. This would include more subjects and make the article more viewable. Thingofme (talk) 10:35, 14 January 2022 (UTC)
  • I have always felt that there is a lot of magic behind Page Previews – as an user I cannot simply look how this thing works... And yeah, the images tend to be weird sometimes. Moreover, the denylist doesn't seem to be a clever way to affect the choice of the image. — Draceane talkcontrib. 23:06, 14 January 2022 (UTC)
  • Could the PageImages be editable, like in a wiki? (Just have a template or magic word that allows editors to choose the image?) Currently it seems to use AI instead of crowdsourcing, which makes sense if you have to pay the people choosing the images, not so much for Wikipedias. It could allow all free images used on the page plus images on a special whitelist (things like File:Placeholder_staff_photo.svg come to mind). A bot run could be used to initialise the editable PageImage with the current automatic one. Kusma (talk) 19:52, 22 January 2022 (UTC)
  • I could imagine this being implemented on the action=info interface, where you can already change the content model and (depending on the wiki) content language. ~~~~
    User:1234qwer1234qwer4 (talk)
    23:50, 11 February 2022 (UTC)
    Update: The civil war image issue has been fixed as a result of thanks to this being highlighted in the community wishlist.
User:Toadspike are there other issues that we're hoping to address outside the one you posted here? I've gone through phab:T91683 and am struggling to find a problem which can't be resolved using T301588 so it would be good to document what those are to assist Community tech in understanding the problem statement(s). Jdlrobson (talk) 21:46, 17 February 2022 (UTC)
User:Jdlrobson I have looked through the Phabricator links you provided. That seems to fix the problem I'm getting at, and I'm very glad the wishlist submission helped. This will work much better than phab:T91683 for images in templates. One example where it might not work as well is if one wants the second image on a page to be the PageImage: One would add class=notpageimage to the first image to exclude it, but someone else might later add another image above the desired image, replacing it as PageImage. Thus, outside of templates, a system like phab:T91683, where the PageImage is permanently specified, regardless of edits to images around it, would still be an ideal solution. Please tell me if I am misunderstanding anything, and thank you again for your work. Toadspike (talk) 03:12, 18 February 2022 (UTC)