filter

jetpack_publicize_options

Filters the options for Publicize. As of Jetpack 8.5, the array keys could be: attach_media bool If Publicize should send the image to the social media platform. Default false.

Parameters

$options
array

Array of Publicize options.

Changelog

How to use this hook

See “How to use actions and filters to customize Jetpack”.

Notes

If you want to restore the previous way Publicize attached an image to a Tweet (instead of relying on a Twitter card), you can use this filter:
add_filter( 'jetpack_publicize_options', function( $option ) { 
    $option['attach_media'] = true;
    return $option;
} );