Preview image not displaying on Twitter

I recently noticed that Twitter is not showing any image previews for our Curatescape site. Even if we didn’t have any images attached to a story, I believe it is supposed to fall back on the logo file so I’m guessing that Twitter has changed something! I confirmed that this issue is present in Explore Baltimore Heritage and Cleveland Historical and appears using both Chrome and Firefox.

Here is an example of how an Explore Baltimore Heritage link appears on Twitter:


Here is an example of how a Cleveland Historical link appears on Twitter:


Image previews still appear to be working just fine on Facebook. Thanks in advance for help in trouble-shooting this issue.

Hi @pousson I think maybe it has to do with the robots.txt file. I tested the links and here’s what the twitter card validator returns for both of our sites…

INFO:  Page fetched successfully
INFO:  18 metatags were found
INFO:  twitter:card = summary_large_image tag found
INFO:  Card loaded successfully
WARN:  The image URL
/f5581a9c0037835ce65d2f63c4ea257b.jpg specified by the 'twitter:image' 
metatag may be restricted by the site's robots.txt file, which will prevent 
Twitter from fetching it.

I updated my robots.txt file, whitelisting Twitterbot above any other rules.

User-agent: Twitterbot

See Getting started with Cards | Docs | Twitter Developer Platform

It appears that this fixes the issue after about 10-20 minutes, though some URLS that have been recently cached may not be re-indexed for up to a week.

PS: this is the default robots.txt file for Omeka.

User-agent: *
Disallow: /files/

This blocks access to the image used in the card.

Depending on your upgrade process, you may need to update robots.txt after each version update.

I think that fixed the issue for me! Thanks for the quick response.