Twitter card Image not working


#1

Hi, my tweet error and robots.txt file

bf-tweet

robots


The source code of the tweet. Images have been rendered from Amazon CloudFront. 

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@BarnabasFund" />
<meta name="twitter:site:id" content="76057324" />
<meta name="twitter:creator" content="@BarnabasFund" />
<meta name="twitter:url" content="https://barnabasfund.org/en/news/chinese-church-raided-and-looted-by-1000-police-and-government-agents" />
<meta name="twitter:creator:id" content="76057324" />
<meta name="twitter:title" content="Chinese church raided and looted by 1,000 police and government agents" />
<meta name="twitter:description" content="More than 1,000 government agents, including police, forced their way into an unofficial church in Henan province on 14 September and removed items from the building." />
<meta name="twitter:image" content="//d2qg2f5ax3lmge.cloudfront.net/sites/default/files/images/article/china-national-congress-4x3-feature_1.jpg" />
<meta property="article:published_time" content="2018-10-04T11:37:08+00:00" />

Tried to reproduce on staging site, Image working properly on and off. unable to trace root cause.
CMS: Drupal 7.59


#2

Your image tag does not have a protocol https: included. Also, check the robots.txt file on the Cloudfront server which is where the image is being served from.


#3

Hi Andy, thank you for the quick response.

How the protocol https: can be included to image tag?

Our web-server is the origin for Cloudfront, which means robots.txt of web used by Cloud Front.


#4

Change

<meta name="twitter:image" content="//d2qg2f5ax3lmge.cloudfront.net/sites/default/files/images/article/china-national-congress-4x3-feature_1.jpg" />

to

<meta name="twitter:image" content=“https://d2qg2f5ax3lmge.cloudfront.net/sites/default/files/images/article/china-national-congress-4x3-feature_1.jpg" />


#5

Hi Andy,

Thanks again.

Understood that, where it is hard-coded. file path? Is it CDN or twitter file ?


#6

Hi Andy, ‘https’ included in CDN config of our staging site, but it remains same.

cdn%20mapping

by disabling the CDN module also the issue remains the same.


#7

Unfortunately I’ve no idea how the tags in your page are populated so I’m unable to advise further.


#8

Hi Andy, Images have been reflecting on summary card after validating twice/thrice or more.
Please see the below screen shots

After validating once/twice.

twitter-card

After validating thrice or more

after-validating-twice-thrice


#9

Home Page validation: