# Les liens vers les pages d'images Mediawiki (HTML) échouent dans les oneboxes

**URL:** https://meta.discourse.org/t/links-to-mediawiki-image-pages-html-break-in-oneboxes/401771
**Category:** Bug
**Tags:** onebox
**Created:** [Avril 29, 2026, 5: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
**Page:** 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: [Avril 29, 2026, 5:07 UTC](https://meta.discourse.org/t/links-to-mediawiki-image-pages-html-break-in-oneboxes/401771/1 "2026-04-29T05:07:18Z")

</div>

Ceci est un problème causé par la mauvaise structure d’URL de Mediawiki, mais cela arrive occasionnellement sur mes sites.

L’URL d’une page HTML pour une image sur Wikipédia fonctionne :

Si je colle cette URL ci-dessous sans backticks, elle créera un onebox (mauvais titre, mais au moins le lien fonctionne) :  
`https://en.wikipedia.org/wiki/Main_Page#/media/File:ESO_Centaurus_A_LABOCA.jpg`

Résultat :

> **[Main PageWelcome to Wikipedia](https://en.wikipedia.org/wiki/Main_Page#/media/File:ESO_Centaurus_A_LABOCA.jpg)**
>
> During the 1998–99 English football season, Gillingham F.C. competed in the Football League Second Division, the third tier of the English football league system. It was the 67th season in which Gillingham competed in the Football League, and the 49th since the club was voted back into the league in 1950. The club signed two new forwards, each for a new club record transfer fee, but started the season in poor form, winning only one of the first eight league games. The team then went on a much-imp...

Si je le fais avec un autre site Mediawiki comme cette URL, cela brise le onebox :  
`https://fortnite.fandom.com/wiki/Fortnite:_Save_the_World?file=Update+v40.20+-+Cover+Art+-+Save+the+World.jpg`

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

Peut-être que cela pourrait être corrigé en vérifiant le `Content-Type` dans la réponse pour `text/html` ? Si c’est le cas, alors ne pas le traiter comme une image ?
