Default Social Image for Jetpack Open Graph Tags
Sets the image Jetpack uses in Open Graph tags when a post has no featured image or images in its content, so shared links always show your brand instead of a blank square.
Opens WPIDE on
Code
$wpide_image = 'https://example.com/wp-content/uploads/social-default.jpg'; // Fallback image URL.
add_filter( 'jetpack_open_graph_image_default', function () use ( $wpide_image ) {
return esc_url_raw( $wpide_image );
} );
Notes
Use a full image URL; 1200×630 pixels works best on most networks.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.