it appears that this is primarily taking place on just my home pages…. why?
all weekend and not a single response?
This small tutorial will help you add a default Open Graph image tag on your home page, to replace the default blank image:
http://jetpack.me/2013/07/12/add-a-default-image-open-graph-tag-on-home-page/
that works for homepage sure but what about pages like this http://www.savealmosthuman.com/tell-syfy-to-save-almost-human/ why does the stupid plugin INSIST on pulling a blank image…. it makes no sense. There is clearly a very large picture on there
You’re right, the plugin should pick up that image. I’m not sure why it didn’t.
Could you try to upload and insert it again in the post, and let me know if it helps?
I had a contact form plugin fueling that page. The image was part of HTML that was implanted into the form introduction then used a shortcode to place the form into the post. The only way I could correct the issue was to rip the html code from the form and insert it into the actual post and use the shortcode for only the form itself and not allow the introduction to be a part of the form. I really wish Jetpack just had some fields in the posts and pages options to input a URL for the image and even select a size for it to be rendered at. Add this to the plugin shouldnt be to extreme I would think. This would allow Jetpack to work in the following order… Post options, featured image, images in post…. It could be just like the options for meta description and keywords, discussion settings, etc. It would eliminate ALL of these issues with OG:IMAGE tags and no one would need to alter code and crap anymore. Can this be accomplished? That way when I create a new post or page on Save Almost Human I will be able to just input whatever image I want as the og:image and whatever size I want without it ever effecting the post and dictating the sizes of images I can use on those posts.
Jetpack’s Open Graph meta tags will grab the Featured Image if you’ve added one to your post.
However, if you do not wish to use the Featured Image option, and if you do not want to insert the image into the post content either, you could use Custom Fields.
Try adding the following code to your theme’s functions.php file, or to a functionality plugin:
function jeherve_custom_cf_og_image( $tags ) {
global $post;
$ogimage = get_post_meta( $post->ID, 'ogimage', true );
if ( is_singular() && $ogimage ) {
unset( $tags['og:image'] );
$tags['og:image'] = esc_url( $ogimage );
}
return $tags;
}
add_filter( 'jetpack_open_graph_tags','jeherve_custom_cf_og_image' );
This way you’ll be able to use the built-in interface that comes with WordPress to create custom Open Graph images that do not have to be inserted into posts or in Featured Images:
http://i.wpne.ws/VztF
You only have to create a custom field named ogimage
, and it will take over Jetpack’s Open Graph Meta tags’ default behaviour.
While this is an edge case and probably isn’t worth adding to Jetpack itself (since most people do insert their images into their posts or use Featured Images), that custom code should do the trick in your case.
I hope this helps.