I’m running a recently migrated Discourse forum. The nice-looking “Link previews” are generating fine for every site I’ve tried, except this one (which is important to us):
Since it doesn’t seem to be working here on Meta either, I wonder if it’s a bug in Discourse, or perhaps just some weirdness about the site itself, that is causing difficulties? Any clues as to what this could be?
That site is not private and does not require any login. I run that site also, so if there’s anything that needs to be done over there I can also give it a try.
I wondered if this could be a caching issue, but it doesn’t look like it, I tried on different Discourse sites, and with URL variations…
Is there any other tag that Discourse requires and that I am missing? On another post here I read that title and description are the only required, and I have those two…
Please note that Discourse does require the description tag to be present and contain enough text to summarize the page, or the target link will not onebox.
By default <iframe> is blocked for security reasons, but if they are from a highly trusted source, a Discourse admin can explicitly whitelist that domain as an <iframe> target in the site settings.
Ok, thanks. I have the title and description. Perhaps it’s the lack of to og:image attribute that’s causing Discourse to dislike my site, though I didn’t read anywhere that this attribute was required.
I’ll have to try with that attribute, but I ran into some technical difficulties doing that with Hugo. When I get that solved I’ll report back here. Thanks
You can check out these two links. Near the end of the 1st post in the first link is a short piece about Advanced iFrames, and immediately below the posted image is about Advanced iFrames.
Near the end of the end of the 2nd topic (Onebox challenges) is something interesting you could try… a curl - and the post gives the code to use (just swap out your URL for the one shown). Rich link previews with Onebox Onebox challenges