# Links to Mediawiki image pages (HTML) break in oneboxes

**URL:** https://meta.discourse.org/t/links-to-mediawiki-image-pages-html-break-in-oneboxes/401771
**Category:** Bug
**Tags:** onebox
**Created:** [29 april 2026 om 05:07 UTC](https://meta.discourse.org/t/links-to-mediawiki-image-pages-html-break-in-oneboxes/401771 "2026-04-29T05:07:18Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)
#### Post date: [29 april 2026 om 05:07 UTC](https://meta.discourse.org/t/links-to-mediawiki-image-pages-html-break-in-oneboxes/401771/1 "2026-04-29T05:07:18Z")

</div>

This is a problem created by Mediawiki’s bad URL structure, but it happens occasionally on my sites.

The URL of an HTML page for an image on Wikipedia works:

If I paste this URL below without backticks, it will create a onebox (wrong title, but at least the link works):  
`https://en.wikipedia.org/wiki/Main_Page#/media/File:ESO_Centaurus_A_LABOCA.jpg`

Result:

> **[Main PageWelcome to Wikipedia](https://en.wikipedia.org/wiki/Main_Page#/media/File:ESO_Centaurus_A_LABOCA.jpg)**
>
> SMS Westfalen was a Nassau-class dreadnought battleship built for the Imperial German Navy. Laid down in 1907 and launched in July 1908, she was commissioned into the High Seas Fleet in November 1909. She was equipped with a main battery of twelve 28 cm (11 in) guns in six twin turrets using an unusual hexagonal arrangement (pictured). Westfalen saw extensive service in the North Sea in the early years of World War I. In the early hours of 1 June 1916, she was heavily engaged in fighting against ...

If I do it with another Mediawiki site like this URL, it breaks the onebox:  
`https://fortnite.fandom.com/wiki/Fortnite:_Save_the_World?file=Update+v40.20+-+Cover+Art+-+Save+the+World.jpg`

Result:  
[](https://fortnite.fandom.com/wiki/Fortnite:_Save_the_World?file=Update+v40.20+-+Cover+Art+-+Save+the+World.jpg)

Maybe it could be fixed by checking the `Content-Type` in the response for `text/html`? If it is, then don’t treat it as an image?

---

_[View the full topic](https://meta.discourse.org/t/links-to-mediawiki-image-pages-html-break-in-oneboxes/401771)._
