Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter:image meta tag not showing image for its Twitter card

<meta name="twitter:card" content="summary">
<meta property="twitter:title" content="Website's title">
<meta property="twitter:description" content="Lorem ipsum dol sor em convectur">
<meta property="twitter:image" content="styles/assetsOptimized/ourStory/StoreFront.jpeg">
<meta property="twitter:url" content="https://website.com/">

Twitter card validation shows as follows: enter image description here

Everything shows in the card except the image.

I have tried:

<meta property="twitter:image" content="https://styles/assetsOptimized/ourStory/StoreFront.jpeg">

These are the Open Graph Meta tags that work for Facebook, placed above the twitter tags(referencing the 11 meta tags found in the twitter validation - viewport, http-equiv:

<meta property="og:title" content="Website's title">
<meta property="og:description" content="Lorem ipsum dol sor em convectur">
<meta property="og:image" content="styles/assetsOptimized/ourStory/ourStoryStoreFront.jpeg">
<meta property="og:url" content="https://website.com/">
like image 958
seandaniel Avatar asked Oct 13 '25 09:10

seandaniel


2 Answers

I see the issue is solved but just FYI: An additional issue here is probably the fact twitter's meta tags do not use the property attribute but the name attribute, as shown in their documentation here.

So your code would look like:

  
<meta name="twitter:image" content="https://styles/assetsOptimized/ourStory/StoreFront.jpeg">
like image 120
Karina D. Avatar answered Oct 15 '25 00:10

Karina D.


a relative URL to the image will not work on Twitter with Twitter Cards. You need to include the fully-qualified domain for the site:

<meta property="twitter:image" content="https://website.com/styles/assetsOptimized/ourStory/StoreFront.jpeg">


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!