Support » Plugin: Yoast SEO » Twitter Cards Image not always showing

  • Resolved Julien G.

    (@julien-g)


    Hello,

    I’ve an issue with my twitter cards image.
    Sometimes (1 time on 3), the image doesn’t appear.

    I have to force it with this link : https://cards-dev.twitter.com/validator
    But even like this, sometimes I’m not able to display the image…

    Example with this tweet :

    I know it’s YOAST which generate the meta links, so why it doesn’t work sometimes ?

    Thanks for your help !
    Julien

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

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support devnihil

    (@devnihil)

    @julien-g We’re sorry to hear you are experiencing this issue on your site.

    We checked on the example page you provided and reviewed the source code, and whereas we are seeing an Open Graph image specified (og:image) the twitter:image meta tag is not being output. If the twitter:image isn’t being output, Twitter should default to use the Open Graph image instead though.

    Can you please confirm whether you are setting the Twitter image on the Social tab of the Yoast SEO metabox? You can do so by going to the edit screen for the post, clicking on the Social tab of the Yoast SEO meta box, and then under ‘Twitter preview’ clicking on the ‘Select image’ button, and then saving the post.

    Thread Starter Julien G.

    (@julien-g)

    Hi devnihil,

    thanks for your answer.

    And, no, I never use the social tab option. Why would I do that ?

    As I said, it works fine 2 times on 3, that’s why I don’t understand Twitter doesn’t always use the Open Graph image…

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi @julien-g

    If you specify an image in the Facebook and Twitter section in the Social tab of the Yoast SEO meta box when editing a post or page, it’ll ensure that those are the images that will be used when sharing on those platforms. Otherwise, it will try to fall back to the featured image set for that post.

    For Twitter, if it doesn’t find a twitter:image to use in the page source, it’ll fall back to the og:image tag.

    Could you provide us an example URL where the issue is occurring so we can try and view the page source and investigate this further?

    Thread Starter Julien G.

    (@julien-g)

    Hi Michael,
    thanks for your help

    In fact, I wish I could avoid going through the Social tab of Yoast every time. I don’t understand why Twitter doesn’t always fall back to the featured image.

    Here an example:

    Tweet here : https://twitter.com/realfrance_fr/status/1514191164412514307

    Article here : https://real-france.fr/camavinga-la-qualification-nest-pas-un-miracle/

    In source code, the og:image is specified : <meta property="og:image" content="https://real-france.fr/wp-content/uploads/2022/04/Icon_ecommerceFotos-eCommerce2-122751117-1.jpg"/>

    But Twitter don’t use it…
    Screen here : https://ibb.co/JF5wkH1

    Don’t understand why.
    Julien

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi @julien-g

    Do you have any other plugin that automatically shares newly published posts directly to Twitter or do you manually copy the link and share it on a new Tweet?

    We’re checking the Tweet now, and it does seem to be picking up the image being used in the og:image tag. We’re also running this URL https://real-france.fr/camavinga-la-qualification-nest-pas-un-miracle/ through the Twitter Card Validator, and the preview seems to be picking it up right away.

    Thread Starter Julien G.

    (@julien-g)

    Hello Michael,

    Yes, we use WP to Twitter to automatically publish our articles on Twitter.

    I also saw that on my two example tweets, the image now appeared. I think it was updated when you put the link into the Twitter Card Validator.

    Because before it didn’t appear, as you can see on my previous capture : https://ibb.co/JF5wkH1

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi,

    We’re not sure if this might be an issue with that plugin that is automatically publishing those articles on Twitter.

    But you can test this out and confirm by disabling that 3rd party plugin temporarily, and upon publishing an article, you can view the page source and check that the og:image tag defined is your featured image, and that the output coming from the Yoast SEO plugin is correct as expected.

    Thread Starter Julien G.

    (@julien-g)

    Hi Michael,

    ok, I will try to share articles without using the plugin.
    We’ll see if it’s works.

    Thanks !

    Thread Starter Julien G.

    (@julien-g)

    I tried to publish my articles without using the plugin ‘WP to Twitter’ as you asked me to, but the problem happened again.

    As you can see on my screenshot, the image doesn’t appear in Twitter, while the og:image is well specified in the article source code…

    screen : https://ibb.co/Kb3TkPy

    I had to force it to appear with the Twitter card validator tool.

    I don’t understand why it does that. :/

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi,

    If you’ve published your article, and then you’ve checked the page source, and it is correctly defining the og:image tag, then that means the output from the Yoast SEO plugin is working as intended.

    We’re not sure why Twitter isn’t showing the expected image upon your initial share in the Tweet, as we’re checking on your robots.txt file and it doesn’t seem to be blocking anything from Twitter.

    Just to confirm, it’ll only show the image after you’ve run it through Twitter’s Card Validator and previewed the card? You may have to get in touch with Twitter support as it may be an issue with the crawler or how it parses your site.

    Thread Starter Julien G.

    (@julien-g)

    That’s it, it only show the image after I run it through Twitter’s Card Validator…

    Ok, thanks for your help.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Twitter Cards Image not always showing’ is closed to new replies.