Twitter onebox images as topic thumbnails

Hello!

I have the preview plugin installed and I noticed that some previews show but others don’t. Previews for tweets especially don’t show at all when I link tweets in my topics. The same thing happens for videos shared form Vimeo. My friend asked a few days ago and was told it’s not an issue with the plugin but with the discourse software itself.
Here’s my friend’s post:Topic List Previews
Is there any way to actually make all the previews how?

Thanks!

Can you please share an example link here on Meta? (I did request that before :wink: ).

Large images from twitter embeds should work. But I think you will need to configure this: (read the section at the bottom of the OP about rich embeds):

2 Likes

Hi Robert,

Here is an example:

When I share the link to the tweet I don’t see a preview.

Forget theTopic List Previews plugin for now. That only impacts the Topic Lists (hence the name)

Getting a Onebox in the Topic is in this case a prerequisite.

Ae you getting that Onebox in a post on your site?

1 Like

This is what I get when I post on my forum. It looks different from what I posted here.

Yes, I did follow the steps David linked but it seems like it didn’t have any effect. The topic list previews do work for some sites but not for others such as Twitter. There was also a video that I linked from Vimeo but it didn’t have a preview.

Yeah that thumbnail might be too small to make the cut.

I suspect you need the richer version that’s rendered here on Meta.

Yeah that screenshot looks like you don’t have the ‘rich’ twitter onebox working. Are you sure you have twitter_consumer_key and twitter_consumer_secret configured in your site settings?

2 Likes

That’s what I thought so I experimented with the thumbnail size using CSS but it still didn’t work.

CSS won’t help. You need the richer embed that will have access to the higher res thumbnail from Twitter’s servers.

For that you will need to be authenticated.

If not they consider you a second class citizen and provide you with the cheap knockoff thumbnail.

I followed the steps in the link you sent but I didn’t see any changes.

After you make the change, you will need to ‘rebuild html’ on the post with the onebox. Otherwise you will see the cached version of the OneBox.

Click the :wrench: under the post to find the ‘rebuild html’ option

3 Likes

It’s possible it might still be caching though? If so add a redundant query string on the end of the url to fool Oneboxing to think it’s a new link.

Eg

https://twitter.com/newscientist/status/1294560523971956736?s=21&order=bacondoublecheese

1 Like

@merefield @david Thank you so much, both methods worked! I now see Onebox and the topic list previews for Twitter links, it’s just delayed a bit but then it shows up. Thank you!

1 Like

Yup that’s sidekiq taking a short snooze before getting on with pulling in images and allowing thumbnailing :).

1 Like

Ah well, I can live with that! :smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.