According to the documentation https://dev.twitter.com/docs/cards the image tag should use meta but a link is generated instead.

The current code generates:
<link property="twitter:image" content="https://example.com/test.png" />

It should output:
<meta property="twitter:image" content="https://example.com/test.png" />

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cdoyle’s picture

Status: Active » Needs review
FileSize
1 KB

Line 125 of the metatag_twitter_cards.metatag.inc should use 'DrupalTextMetaTag' instead of 'DrupalLinkMetaTag'.

DamienMcKenna’s picture

FileSize
2.29 KB

Ah, I used DrupalLinkMetaTag instead of DrupalTextMetaTag for several items. Looking at it further, I think the classes are incorrectly named, but that's a different issue.

cdoyle’s picture

Yeah, that very well could be. I was only using twitter:image so that's the only one I noticed/patched but it does look like there are other instances.

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed! Thanks for finding this, cdoyle.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.