When you share a post on Facebook, or when Jetpack Social auto-shares a post to your Facebook page, Facebook crawls the page and looks for Open Graph meta tags to build a complete post preview (with an image, title, description, …).
Jetpack automatically creates these meta tags for you, so you don’t have to worry about it!
Jetpack will also add an Image meta tag to your home page if you use a Site Logo, or a Site Icon. If you don’t use any of these 2 options, you might want to add your own custom image meta tag there. To do so, add one of the following code snippets to your theme’s functions.php file, or to a functionality plugin:
function fb_home_image( $tags ) {
if ( is_home() || is_front_page() ) {
// Remove the default blank image added by Jetpack
unset( $tags['og:image'] );
$fb_home_img = 'YOUR_IMAGE_URL';
$tags['og:image'] = esc_url( $fb_home_img );
}
return $tags;
}
add_filter( 'jetpack_open_graph_tags', 'fb_home_image' );
Alternatively, you can change the default image used any time Jetpack can not determine an image to use:
function custom_jetpack_default_image() {
return 'YOUR_IMAGE_URL';
}
add_filter( 'jetpack_open_graph_image_default', 'custom_jetpack_default_image' );
It’s worth noting that the fallback image has to be larger than 200 x 200px, as per Facebook requirements. If your image is smaller, Facebook will ignore it.
Keep reading.
More from Developers, newest first.
Jetpack 16.1.3: Critical Security Update
Yesterday we released a new version of Jetpack, 16.1.3. This release contains a critical security update. While we have no evidence that this vulnerability has been…
2 min read
How to Install WordPress on XAMPP + a Better Alternative
Learn how to install WordPress on XAMPP step by step, plus compare it to a modern alternative built specifically for WordPress developers.
8 min read
How to Install WordPress on a Subdomain (Step-by-Step Guide)
Complete setup guide: How to create one in your host, point DNS, secure your site, and configure key settings. Plus, how subdomains impact your SEO.
7 min read
Run your WordPress site the AI-first way.
Free to start, and AI agents are free to connect. Money back within 14 days on yearly plans.


