4

This question already has an answer here:

I posted a oneboxed Wikipedia link in chat, and the image picked was seemingly a random image from the article.

  • It wasn't the first image in source HTML
  • it wasn't the first image in rendered HTML
  • it wasn't the first image alphabetically.

The link was to main article, NOT to an anchor tag inside.

So, what is the algorithm for picking the image to use in Wikipedia's onebox?

marked as duplicate by random, nicael, Nathan Tuggy, Patrick Hofman, Keen Jul 16 '16 at 21:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3

As balpha explain here, SE is using the PageImages API:

...but overall in my testing it seemed to come out ahead, so I've switched to the PageImages version.

Meaning, moving the ball to Wikipedia's side.

As written in their page:

Its aim is to return the single most appropriate thumbnail associated with an article, attempting to return only meaningful images, e.g. not those from maintenance templates, stubs or flag icons. Currently it uses the first non-meaningless image used in the page.

It doesn't mention technical details though (i.e. how it defines "meaningless"), maybe they're kept private on purpose so that people won't try to "game the system" and force their own pictures to be selected over others.

Not the answer you're looking for? Browse other questions tagged .