XF 2.2 Adding BB code media sites "Speedtest.net"

Mr. Jinx

Well-known member
I'm trying to add Speedtest.net as a media site, but the problem is there are two different versions of the URL.

The Match URLs look like this:
https://www.speedtest.net/result/{$id:digits}
https://www.speedtest.net/result/d/{$id:digits}

And the embed template:
Code:
<div class="bbMediaWrapper">
    <a href="https://www.speedtest.net/result/{$id}" rel="external" target="_blank"><img src="https://www.speedtest.net/result/{$id}.png" loading="lazy" width="500" height="267" /></a>
</div>

The problem is, when the match url contains /d/ this should also be reflected in the embed template.
Any idea's how to do this?
 
Some users post the URL of the speedtest instead of the BBcode.
Also, the picture is huge. By using Media sites code, I can easily resize the image to a width of 500px.
It's just there for convenience.
 
Back
Top Bottom