Mastodon doesn’t embed

Those posts used an iframe which will work when the iframe source is allowlisted, e.g.:

<iframe src="https://mastodontti.fi/@jagster/109375542625679201/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe>

Your problem is likely that https://foorumi.katiska.eu/ probably has https://mastodontti.fi/ allowlisted as an iframe source (site setting allowed iframes) but not https://kvarkki.nexus/.

Here’s how it looks on try.discourse.org without kvarkki allowlisted:

and with it allowlisted:

content is:

<iframe src="https://kvarkki.nexus/@jagster/113763726148314458/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="100%" allowfullscreen="allowfullscreen"></iframe>

(BTW the script tags on the example you linked are completely ignored, only the iframe is useful/necessary)


… it might be nifty to have a guide here on “how to enable mastodon embeds on your site”.

The decentralised nature of Mastodon is AWESOME… except there’s no easy way to say “allow all mastodon embeds” since it could be any domain.

Will ponder.

1 Like