Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Starting here, we kind of wondered how the chat selects the preview picture. But with this, we changed our direction: where does the chat get these pictures from? The displayed pyramids picture is nowhere to be seen on the page itself (unless I overlooked something)!

share|improve this question
The image is listed as "in use" by the Isis article: I can't see where, though, not even in older versions – Pëkka Jun 12 '11 at 12:45
up vote 6 down vote accepted

It just picks the largest (to be precise, tallest) image on the page as returned by Wikipedia's API – and that particular image, even if only displayed as a tiny thumbnail, has a height of 2906 pixels.

In most cases, the largest image is a good representation of the Wikipedia article (I tested a lot); in this case, it's so-so. I've seen worse, though: The image for the Wolfgang Petry article is a picture of Johann Sebastian Bach – but you probably have to be German to “appreciate” that :)

We're now using Wikipedia's PageImages API; see my updated answer here.

share|improve this answer
So it inspects the image quite a bit, eh? Thanks. – Xeo Jun 12 '11 at 14:05
What happens if multiple images have the same, tallest height? – fredoverflow Jun 12 '11 at 15:31

There is hidden (display:none) picture for that in the Wikipedia page source:

    <td class="navbox-abovebelow"
        <a href="/wiki/File:All_Gizah_Pyramids.jpg" class="image">
        <img alt="All Gizah Pyramids.jpg"
             height="20" />
        <a href="/wiki/Portal:Ancient_Egypt"
           title="Portal:Ancient Egypt">
        <b>Ancient Egypt Portal</b></a>

If you click show on the right corner of that block, you would see that picture :D

Enter image description here

share|improve this answer
Was just about to post this. I don't understand what the meaning of this is, though - the image has no rel attribute, no nothing... Doesn't look clean to me – Pëkka Jun 12 '11 at 12:47
We found out that it is unhidden by clicking [show] on the bar at the bottom of the page, reading "Ancient Egyptian religion". It is a really tiny image at the bottom of the expanded area. – Xeo Jun 12 '11 at 12:50

It seems to be extracting the image from the last HTML <a> tag with the attribute image="class" on the article.

share|improve this answer

You must log in to answer this question.

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