Background
Bug report
Steps:
- Share https://en.wikipedia.org/wiki/Tom_Hanks or https://www.wikidata.org/wiki/Q2263 as link via a social app that generates a preview card (e.g. Apple iMessage).
Expected:
One image.
Actual:
Three identical images.
Other information:
- https://www.wikidata.org/wiki/Q2263, observe there is only one image associated with the item.
- View source and look for <meta .. og:image, where there are three images:
<meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/a/a9/Tom_Hanks_TIFF_2019.jpg"/> <meta property="og:image:width" content="1200"/> <meta property="og:image:height" content="1670"/> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Tom_Hanks_TIFF_2019.jpg/800px-Tom_Hanks_TIFF_2019.jpg"/> <meta property="og:image:width" content="800"/> <meta property="og:image:height" content="1113"/> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Tom_Hanks_TIFF_2019.jpg/640px-Tom_Hanks_TIFF_2019.jpg"/> <meta property="og:image:width" content="640"/> <meta property="og:image:height" content="890"/>
Requirement
Scope: Desktop and mobile web. Pages must include only a single og:image tag in the HTML metadata:
- Open Graph metadata should not duplicate the same image at multiple resolutions.
- Verification applies to Wikipedia article pages and Wikidata entity pages.
BDD
Feature: Prevent duplicate og:image tags
Scenario: Wikipedia article page metadata
Given I visit a Wikipedia article page with an image (e.g., Tom Hanks)
When I inspect the HTML source for <meta property="og:image">
Then only one og:image tag is present
And no duplicate entries for different resolutions exist
Scenario: Wikidata entity page metadata
Given I visit a Wikidata entity page with an image (e.g., Q2263)
When I inspect the HTML source for <meta property="og:image">
Then only one og:image tag is present
And no duplicate entries for different resolutions existTest Steps
Test Case 1: Wikipedia article page has single og:image tag
- Open https://en.wikipedia.org/wiki/Tom_Hanks.
- Inspect page source or use DevTools Elements panel.
- Search for <meta property="og:image".
- AC1: Exactly one og:image tag is present.
- AC2: No duplicate og:image tags exist for different resolutions.
Test Case 2: Wikidata entity page has single og:image tag
- Open https://www.wikidata.org/wiki/Q2263.
- Inspect page source or use DevTools Elements panel.
- Search for <meta property="og:image".
- AC3: Exactly one og:image tag is present.
- AC4: No duplicate og:image tags exist for different resolutions.
QA Results - Prod
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T295521#11154900 |
| 2 | ✅ | T295521#11154900 |
| 3 | ✅ | T295521#11154900 |
| 4 | ✅ | T295521#11154900 |













