• bjarnijo90

    (@bjarnijo90)


    Ever since I changed my permalink structure, facebook doesn’t display any thumbnails when I share a post from my website.

    My website is youexplained.com

    How do I fix this? I tried disabling all plugins.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can use the Facebook Debug Tool to retrieve new information, because there may be a caching issue with Facebook.
    Just paste the URL there and see what exactly Facebook is getting.

    Thread Starter bjarnijo90

    (@bjarnijo90)

    Everything is good, except for the image. It’s getting some avatar image from the page, instead of the featured image of the post.

    I don’t know if you are using some plugin for generating the Open Graph tags or added them manually, but you should set the featured image URL as a content value in og:image.
    <meta property="og:image" content="FEATURED IMAGE URL" />.

    The code should look something like this:

    <?php
    if (has_post_thumbnail( 'single-post-thumbnail' )) :
    $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ) );
    ?>
    <meta property="og:image" content="<?php echo $image; ?>" />
    <?php endif; ?>

    Or you could use Yoast SEO which has an option for uploading and changing the content that will be shared on Facebook.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changed permalinks – now facebook doesn't display images when sharing’ is closed to new replies.