Support » Fixing WordPress » FaceBook grabs incorrect thumbnail image!
5 years, 1 month ago
I am using the “Facebook Like Thumbnail” plugin and it works great, but once I activate “WP-PostRatings” it chooses the rating image before the attached post thumbnail. Please help!
Fixed! Added this to my head in my header.php
<meta property="og:image" content="<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
<?php echo $image; ?>" />
4 years, 11 months ago
I know you have fixed it for your site but can you tell me if the WP-PostRatings plugin actually adds the ratings image above the post content because that could be the reason.
I had my PostRatings come after my image and PostRatings was somehow being used as the default image. I have a custom theme though, with custom placed PostRatings plugin.
How about a link to your page where this problem was occuring?
It was for a website that doesn’t exist anymore. Why? Do you need help with something?
Never mind! Just wanted to look into the issue.
Yeah, it was just grabbing the star.png before my actual attachment that’s all.
You need to implement OpenGraph properly (in your theme) for Facebook to grab the correct image when sharing your link in FB
That’s what I thought the plugin was for.
It specifies only the meta og:image tag and not all of them, I let FB figure that out from the page itself.
Yes, I understand, but without the plugin and just adding in: