Steps to replicate the issue (include links if applicable):
- Open an article and click an image that is not the lead image — e.g. the Modern Times still in https://en.wikipedia.org/wiki/Paulette_Goddard. MediaViewer opens and rewrites the address bar to: https://en.wikipedia.org/wiki/Paulette_Goddard#/media/File:Goddard-Modern-Times.jpg
- Paste that URL anywhere that renders OpenGraph link previews (Mastodon, Discord, Slack, Facebook, iMessage, …).
What happens?:
The card shows the article's PageImages lead image instead:
$ curl -s 'https://en.wikipedia.org/wiki/Paulette_Goddard' \ | grep -o '<meta property="og:image"[^>]*>' <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/3/36/Paulette_Goddard_1947.jpg/960px-Paulette_Goddard_1947.jpg">
Observed in the wild (Mastodon, May 2026): a user shared a #/media/ link expecting the still they were viewing, got the article's lead portrait in the card, and concluded Mastodon was broken.
What should have happened instead?:
The preview card shows the image the link actually opens on for a human visitor (File:Goddard-Modern-Times.jpg).
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
Why this happens
- MediaViewer keeps the lightbox state only in the URL fragment (#/media/File:..., handled client-side by mmv.bootstrap). Per RFC 3986 §3.5, fragments are never transmitted to the server.
- Link-preview scrapers do not execute JavaScript. They fetch the URL — the request is byte-identical to fetching the plain article — and read the OpenGraph tags of the response, where PageImages has set og:image to the article's page image.
- So this is structural, not a scraper bug: no server-side component can emit metadata matching state that exists only in a fragment, and no OpenGraph consumer can do better with the information it receives.
Related
T417498 on file pages.
