Not able to retrieve image id from sibling site within a switch_to_blog

Just keep in mind this is only going to get you the image ID, but it should do the trick… does in my circumstance at least.

// switch to the correct blog
switch_to_blog( $site -> blog_id );

// pull in our db global
global $wpdb;

// get the image ID
$_image_id = $wpdb -> get_col( $wpdb -> prepare( "SELECT ID FROM $wpdb->posts WHERE guid='%s';", get_theme_mod( 'white_logo' ) ) );

// switch back to the original blog
restore_current_blog( );