• Resolved Philip John

    (@philipjohn)


    Hi folks,

    When images weren’t showing up in Twitter posts for our site I realised that the source code is missing the twitter:image tag. Here’s the full batch of social meta data from the source:

    <meta property="og:locale" content="en_US">
    <meta property="og:type" content="article">
    <meta property="og:title" content="Shenstone garden centre ready to reopen restaurant after coronavirus closure - Lichfield Live">
    <meta property="og:description" content="A Shenstone garden centre says it has taken a number of steps to allow an in-store restaurant to reopen.">
    <meta property="og:url" content="https://lichfieldlive.co.uk/2020/07/02/shenstone-garden-centre-ready-to-reopen-restaurant-after-coronavirus-closure/">
    <meta property="og:site_name" content="Lichfield Live">
    <meta property="article:published_time" content="2020-07-02T11:52:07+00:00">
    <meta property="article:modified_time" content="2020-07-02T11:54:19+00:00">
    <meta property="og:image" content="https://lichfieldlive.co.uk/wp-content/uploads/2020/05/Dobbies-Garden-Centre-Exterior1.jpg">
    <meta property="og:image:width" content="1200">
    <meta property="og:image:height" content="675">
    <meta property="fb:app_id" content="739340609540421">
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:creator" content="@lichfieldlive">

    As you can see, og:image appears fine and the other twitter: meta properties are there, but not twitter:image.

    My settings have the “Summary with large image” selected, and the featured image for the post is a decent 1200×675 image. The post-specific settings do not override the details

    Screenshot of general Twitter settings: https://cloudup.com/cygFgJ5ZZUO
    Screenshot of post-specific settings: https://cloudup.com/cMZ_hvk-2FF

    I am running WP 5.4.2 with Yoast SEO 14.4.1

    Any idea what could cause the tag to not appear?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @philipjohn,

    Thank you for reaching out.

    The last 2 Twitter metatags are included on all pages. As for the twitter:image tag, you would need to configure an actual image to be used for Twitter if you’d like see a twitter:image meta tag.

    If Twitter does not find a twitter:image metatag, it falls back to the OpenGraph image. You can find more information on this here: https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/markup.

    Thread Starter Philip John

    (@philipjohn)

    you would need to configure an actual image

    My understanding was that Yoast would print that year or, using the featured image, just like it does for og:image. It’s that not the case?

    Sorry if I was unclear.

    The twitter:image tag is only output when you configure a (different) image in the metabox. This means that it’s just not necessary to also output the twitter:image tag if the og:image is already present. Twitter falls back to the Open Graph image.

    Thread Starter Philip John

    (@philipjohn)

    Ohh got ya. Okay, this is more a problem of Twitter not picking up the image than it not being there in the right format then.

    Thanks for the help ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘No twitter:image tag despite other tags present’ is closed to new replies.