Get random header image url from registered images in theme.

Signature

get_random_header_image()

Return

(string) Path to header image

Source

function get_random_header_image() {
	$random_image = _get_random_header_data();
	if ( empty( $random_image->url ) )
		return '';
	return $random_image->url;
}
WP Trac GitHub

Link here