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" />

Comments

cdoyle’s picture

Status: Active » Needs review
StatusFileSize
new1 KB

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

damienmckenna’s picture

StatusFileSize
new2.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.