Woocommerce – Default product image by user role

/**
 * Only allowing the customer and admin user role to view the product images
 *
 * @param $value
 *
 * @return bool
 */
function woocommerce_product_get_image_id_callback( $value ) {

    global $current_user;

    if (
        in_array( 'customer', (array) $current_user->roles )
        || in_array( 'administrator', (array) $current_user->roles )
    ) {
        return $value;
    } else {
        return false;
    }

}

add_filter( 'woocommerce_product_get_image_id', 'woocommerce_product_get_image_id_callback', 10, 1 );

Copy the above code and paste it into you functions.php file of your child themes