Image not appearing in Twitter card?

image
cards

#1

This is my site: https://trialstracker.ebmdatalab.net

The Twitter card image link is as follows: <meta name="twitter:image" content="/css/img/trialstracker-image.png">.

The image is present at that path, the PNG is 240x240px and less than 2MB. I’m not blocking the path in my robots.txt.

Yet when I and others tweet the link, the title and description appear correctly, but the image does not appear.

The Twitter card validator says the card is OK, but also doesn’t show the image.

Any ideas why this might be happening? Thanks.


#2

You need to include a fully qualified domain and protocol (i.e. https://yoursite.com) before the image path. The fetcher grabs that image separately, so it can’t do relative lookups.


#3

Thanks for the swift response!

It would be great if the Twitter card validator could flag this up.


#4

That’s a good idea, and we should also make sure that the documentation makes it clear. I’ll see what we can do to clarify.


#5

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