What is the order of priority of image previews for discourse links on twitter?

I know that when you post a link to your forum on Twitter, and if the linked post contains a Image or more, the preview of the thread on Twitter will show that image or the first image in the thread as the thumbnail for the preview.

I have also read that there are “categories images” which can be shown as the thumbnail, and also there is a “twitter summary large image” option in the site settings, however I have never been able to see any of these latter two at work as thumbnails on twitter, because if there is no image in the body of the forum post itself, the thumbnail I get is just the default gray image with an icon in the center, to the felt pf the text preview.

So, how can I control which image is displayed as the topic thumbnail on Twitter?

Your help will be much appreciated.

ps: twitter api keys are stored and twitter login is working.


There are several settings for this.

  1. opengraph image
  2. twitter summary large image
  3. category logo image
  4. post first image

The opengraph image is the base. If you only set up this then it will appear if there is no post or category image.

If you set up a twitter summary large image then it will override the opengraph image on Twitter. So it will appear on Twitter instead of opengraph image.

The category logo image and post first image always take priority over the others.

Priority order:

  1. post first image and category logo image
    (if missing) :arrow_down_small:

  2. twitter summary large image
    (if missing) :arrow_down_small:

  3. opengraph image
    (if missing) :arrow_down_small:

  4. large icon

(if I am right)


The opengraph image and twitter summary large image you can set up here: /admin/site_settings/category/branding

For the category logo image go to the specific category settings Images tab.

Tests on Twitter

I share a post link which has no contain image and with twitter summary large image setting :arrow_down_small:

Screenshot 2022-12-01 at 10.24.55

I share a post link which contain image and with twitter summary large image setting :arrow_down_small:

Screenshot 2022-12-01 at 10.26.55

I share a post link which not contain image and no twitter summary large image but I seted up an opengraph image

Screenshot 2022-12-01 at 10.30.08

I share a category link which contains category logo image

Screenshot 2022-12-01 at 12.02.51

Share site link without opengraph image and other setting.
Screenshot 2022-12-01 at 10.34.03

Hope this helps :slightly_smiling_face: