Page MenuHomePhabricator

OpenGraph meta tag lists site logo instead of uploaded image when linking to file page
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • On social media, for instance LINE, share a picture

What happens?:

The link preview generated is of the site logo, not the picture!

What should have happened instead?:

The link preview should be of the picture not the logo.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

ProductVersion
MediaWiki1.45.1 (7c47b95)
PHP8.2.29 (fpm-fcgi)
WikiSEO2.7.0 (dc31567)

Other information (browser name/version, screenshots, etc.):

https://abj.miraheze.org/wiki/File:Abj_sonoma_ca_2026_2.jpg

Screenshot_20260215_094908_LINE.jpg (720×1,905 px, 325 KB)

Yes you might say it's the responsibility of the social media to pick the right preview.

But the preview is based on the metadata in the File: page.

In this case the site logo is a picture of the same person but many many years ago.

Which creates an extreme misunderstanding!

You might say that user has a responsibility to double check if things turned out right.

But many share operations you just share it and you don't go back to double-check because you trust it.

Anyway below the picture is the file name and indeed the first picture is the first JPG in the file.

But it's not the main JPG.

This is just a time bomb waiting to explode even worse.

Event Timeline

Jidanni renamed this task from Looks like user share different picture to Looks like user shared different picture.Feb 15 2026, 2:01 AM
Aklapper renamed this task from Looks like user shared different picture to OpenGraph meta tag lists site logo instead of a picture from the wiki page.Feb 15 2026, 10:11 AM
RhinosF1 renamed this task from OpenGraph meta tag lists site logo instead of a picture from the wiki page to OpenGraph meta tag lists site logo instead of uploaded image when linking to file page.Feb 15 2026, 10:59 AM

I think this is what the open graph metadata is documented to do but it also seems a bit of a questionable UX and whether someone would expect it

In my understanding the behavior depends on what the code sets as the URI value for "og:image".
Whether it makes sense to parse the page for some embedded image instead of simply picking the site's icon is a question for folks interested in imperformance.

Compare
https://www.facebook.com/share/p/1ExWpaF71r/

Screenshot 2026-02-15 20.39.24.png (846×549 px, 119 KB)

https://www.facebook.com/photo/?fbid=1426054499531524&set=a.1426054899531484
operates fine also.

By the way, this is wrong,

Screenshot 2026-02-15 20.27.36.png (902×349 px, 80 KB)

It needs to add the words "...what is now called...".

Posting some image file on Facebook has nothing to do with posting a link and some software tries to pick an image for that link.

{F72112603}

We cannot see that image, see https://www.mediawiki.org/wiki/Phabricator/Help#File_visibility

It needs to add the words "...what is now called...".

Off-topic here, and clear enough from the given context anyway.