Tweets not showing images?


I’m trying to understand why tweets won’t show the first image from my post. I suspect I’ve got a setting wrong somewhere, but I can’t figure it out.

To demonstrate, here is an original discourse post:

And here’s a tweet with a link to this post. It shows a placeholder image - not even my site logo.

Here’s a test I did with a link to another Discourse instance - as you can see it correctly features the first image.

Is there some settings magic I need to apply to get this to work?

On a related note, is there a way to change the card format to ‘Summary Card with Large Image’? Since we’re running a graphics-oriented community this would make sense for us.


You must configure the twitter API keys in your site settings for this to work as I recall.

Hmm, we haven’t done that on the Sketchfab forum, which shows the images correctly. My hunch is that I’ve misconfigured something else. Also, I think the only available Twitter settings are for authentication?

The Twitter Card Validator is showing this warning for the linked post:

WARN:  The image URL specified by the 'twitter:image' metatag may be restricted by the site's robots.txt file, which will prevent Twitter from fetching it.

Testing this meta topic however looks good on the validator.


Okay, I can verify that fresh Discourse installs are not loading image previews on Twitter.

This was regressed 24 days ago in:

Should we revert this commit @codinghorror?


Sure that seems fine. You might ping that user I think he posted here about it.


Okay, that commit is now reverted. I couldn’t find Dan’s account here on meta, but I left the comment on PR.

Thanks for bringing this issue to our notice @bartv. :+1:


Wow that’s very fast indeed! So can I now rebuild + test, or is there something else you guys need to do before this fix is available?

1 Like

You will have to wait for commit to land in tests-passed branch.


The commit is now landed in tests-passed branch and I verified that the issue is fixed now.