• Resolved jessik

    (@jessik)


    Hi,

    Like the title says, my Yoast plugin doesn’t set the og:image anymore, causing FB to show my website Logo whenever I share a post… wich is problematic.

    I’v tried everything adviced here:
    https://yoast.com/help/why-doesnt-facebook-display-an-image/

    Clearing the cache, setting the image manually, etc… It doesn’t work.
    + when I set the image manually, yoast tells me that it doesn’t take .webp images. But on older posts (wich also have .webp images), Facebook sharing was OK, even though I never had to set the image manually.

    Twitter:image works fine.

    See the page source code for newest posts:

    property=”og:locale” content=”fr_FR”><meta
    property=”og:type” content=”article”><meta
    property=”og:title” content=”Euphoria renouvelée pour une saison 3… avec Tom Holland? – Blaque”><meta
    property=”og:description” content=”Comment ne pas renouveler Euphoria, la série primée aux Emmy Awards pour une saison 3? Au vu de l'engouement et le buzz qu'elle génère sur…”><meta
    property=”og:url” content=”https://blaque.fr/culture/television/euphoria-renouvelee-pour-une-saison-3-avec-tom-holland”><meta
    property=”og:site_name” content=”Blaque”><meta
    property=”article:publisher” content=”https://www.facebook.com/BlaqueLeMag”><meta
    property=”article:published_time” content=”2022-02-08T11:22:56+00:00″><meta
    property=”article:modified_time” content=”2022-02-08T11:59:08+00:00″><meta
    name=”twitter:card” content=”summary_large_image”><meta
    name=”twitter:image” content=”https://blaque.fr/wp-content/uploads/2022/02/euphoria-saison-3.webp”><meta
    name=”twitter:creator” content=”@BlaqueFR”><meta`name=”twitter:site” content=”@BlaqueFR”>

    And for odler posts:

    property=”article:publisher” content=”https://www.facebook.com/BlaqueLeMag”><meta
    property=”article:published_time” content=”2021-01-05T21:57:40+00:00″><meta
    property=”article:modified_time” content=”2021-01-05T21:59:11+00:00″><meta
    property=”og:image” content=”https://blaque.fr/wp-content/uploads/2021/01/karrueche4.jpg”><meta
    property=”og:image:width” content=”600″><meta
    property=”og:image:height” content=”450″><meta
    property=”og:image:type” content=”image/jpeg”><meta
    name=”twitter:card” content=”summary_large_image”><meta
    name=”twitter:creator” content=”@BlaqueFR”><meta
    name=”twitter:site” content=”@BlaqueFR”>`

    On older posts, the og:image is here, but the twitter:image isn’t.

    Chat could be causing that?
    Thanks

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Michael Ti?a

    (@mikes41720)

    Hi @jessik

    Upon checking https://blaque.fr/culture/television/euphoria-renouvelee-pour-une-saison-3-avec-tom-holland, the og:image tag in the page source is set to https://blaque.fr/wp-content/uploads/2022/02/euphoria-saison-3.webp

    Is this now the expected image and is it generating the correct preview? But it does look like you aren’t using the Yoast SEO plugin currently.

    If you were to edit a post or page and then go to the Yoast SEO meta box and then the Social tab and the Facebook section, there is an option to set an image to be used for the social preview. Webp images currently aren’t supported. Also, you need to ensure that the image isn’t under 100kb or over 2mb in terms of file size.

    Could you share a screenshot with us (using snipboard.io) of the image you’ve set in the Social tab of the Yoast SEO meta box for that post or page?

    • This reply was modified 2 years, 9 months ago by Michael Ti?a.

    I’ve been struggling with this the past couple of hours. I changed my featured image from jpg to webp and the og:image doesn’t show up in the Yoast code. Changing it back to the jpg image and it shows up again.

    Yoast SEO doesn’t support webp images for the og:image. Facebook does!

    In the past, Facebook didn’t support it, but today I did some tests and Facebook shows the webp image in developers.facebook.com without a problem and when I post the page url with a webp og:image on the page, the image shows up in the timeline.

    Time for Yoast to implement it in its plugin.

    For anyone interested, I add the og:image manually to the <head> area in the header.php by adding this

    <?php
    $attachment_id = get_post_thumbnail_id( $post_id ); $image_attributes = wp_get_attachment_image_src( $attachment_id, "full" );
    $fotoo = $image_attributes[0];
    if (!empty($fotoo)) {?>
    <meta property="og:image" content="<?php echo $fotoo;?>"> 
    <?php } ?>
    • This reply was modified 2 years, 9 months ago by Wendihihihi.
    Thread Starter jessik

    (@jessik)

    Hi @mikes41720. Thank you for your answer. Sorry, but the og:image is now present because I downloaded a new plugin especially to add opengranph tags. I had many posts to publish and I couldn’t wait for a fix to use auto-publish on my posts, so I needed the social media posts to look good. So I think the problem with yoast is still there.

    • This reply was modified 2 years, 9 months ago by jessik.
    Thread Starter jessik

    (@jessik)

    @wendihihihi So that’s a webp problem. It’s curious, because some of my posts worked well, even with webp…
    Anyway, thank you for the piece of code. I’ve chosen the easy way by using another plugin to add opengraph tags.But maybe I’ll come back to that ??

    Yes Yoast SEO doesn’t support webp images.

    This is what Yoast wrote 2 months and 3 weeks ago.

    `Thanks for your review and for suggesting a new feature for our plugin. You are actually not the first to have requested this feature. That means a feature request is already created and is currently under review by our product team.

    For now, you can only use the file types of JPEG, PNG, and GIF to set as the og:image tag for the Facebook image in the social tab of the Yoast SEO meta box. WEBP isn’t supported at this time, but please do check our changelog and release posts from time to time for upcoming features and additions to the Yoast SEO plugin.`

    I checked the changelog and they haven’t added it since.

    Maybe someone at Yoast can explain why they won’t support it while Facebook does?

    This is a better code since it only appears if there is a webp featured image

    <?php
    $attachment_id = get_post_thumbnail_id( $post_id ); $image_attributes = wp_get_attachment_image_src( $attachment_id, "full" );
    $fotoo = $image_attributes[0];
    if (!empty($fotoo) && get_post_mime_type( get_post_thumbnail_id()) == 'image/webp') {?>
    <meta property="og:image" content="<?php echo $fotoo;?>"> 
    <?php } ?>
    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi,

    We do know that .webp images currently aren’t supported in our Yoast SEO plugin. There’s a warning or notification that appears when you try to set an image with the .webp file extension as your open graph image.

    We do know that WordPress 5.8 introduced support for webp. We have an open feature request for this so that it can hopefully be added in the future and so that it will work with our plugin as well.

    In the meantime, please use supported formats such as JPG, PNG, and GIF. Thanks for your understanding.

    This thread has been marked as resolved due to lack of activity by original poster.

    If you are not the original poster but have a similar issue, please open a new request.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Yoast doesn’t set og:image anymore’ is closed to new replies.