Jump to content

Topic on Talk:Page Previews/Flow

Wrong pictures on certain articles

4
TheDestroyer111 (talkcontribs)

If I mouse over links to certain articles (such as https://en.wikipedia.org/wiki/McDonnell_Douglas_F-4_Phantom_II) with Hovercards beta turned on, the image from the infobox is ignored and instead, in the case of the F-4, it shows me the photo of a mockup, which is located in the Development section of the article, below the infobox.

In case of the https://en.wikipedia.org/wiki/Folding-Fin_Aerial_Rocket, it is even more awkward - the image in its hovercard is two images and half the article lower than the image which should be displayed.

Geekdiva (talkcontribs)

It's caused when the picture is in a template, I think. I just wrote about this on a Signpost article:

  • Not if the reader is using the beta Hovercards: "...to the infamous post capture photo of Khalid Sheikh Mohammed (pictured). (Mohammed...has a much more flattering picture of himself on his Wikipedia article.)" I'm enjoying using Hovercards a lot. It helps me verify that I'm linking to the correct article in an edit preview, for example. However, it does ignore the first image on a page if that image is in a template—say, Template:Infobox. So hovering over the link to Khalid Sheikh Mohammed pulled up the infamous photo (the next one down the page outside of a template) and not the "more flattering picture" at the top. FYI!

I've also been able to recognize hatnote text that was formatted instead of added by template, and then go to the article in the Hovercard and fix that. Thanks!

TheDestroyer111 (talkcontribs)

It's definitely not just due to picture being in template - lots of pages properly display a picture inside an infobox, just that the F-4 and FFAR rocket are unlucky ones.

OVasileva (WMF) (talkcontribs)

There's actually two culprits here. The first is that we're restricting the pageimages API (which hovercards uses) to only free images. We will be changing this to allow for non-free images from hovercards to appear as well. If you're interested in details, follow this task, which will allow extensions to select whether they want to display any images or free images only. I'd like to note however, that we will only allow for non-free images for the communities which have approved non-free images for a particular extension. The second is that we're pulling images from the entire page, meaning that images which appear later in each article are showing as the images on a hovercard. To account for this, we're restricting the pageimages API to only pull images from the lead section and infobox for an article. For more info on this, check out this task. The results of this for hovercards will be: if the first image in an article is within the infobox or lead section of the article, we will display the image for the hovercard of the article. If an image appears in later sections, no image will be displayed for that article.

Reply to "Wrong pictures on certain articles"