I had some difficulties ironing out bugs in an implementation of the WordPress theme customiser when using image uploaders. When I went searching on the interwebz for some simple example code, I found none. So in the hope that this makes life a little easier for anyone else out there attempting to figure how to add custom image uploaders to the theme customiser, here is a very simple piece of code which will hopefully help guide you in the right direction.

<?php
/*
 * Register new theme customiser functionality
 *
 * @author Ryan Hellyer <ryanhellyer@gmail.com>
 * @since 1.0
 * @param object $wp_customise
 */
function slug_register_new_customisation( $wp_customize ) {

	/*
	 * Add new section
	 */
    $wp_customize->add_section(
		'slug_new_section',
		array(
			'title'    => __( 'Some new section', 'slug' ),
			'priority' => 120,
		)
	);

	/*
	 * Image uploader
	 */
	$wp_customize->add_setting(
		'slug_theme_options[image_uploader_demo]', array(
			'capability' => 'edit_theme_options',
			'default'    => 'http://prsb.co/wp-content/themes/pixopoint-2/images/ryan-cut-small.png',
			'type'       => 'option',
		)
	);
	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'image_uploader_demo',
			array(
				'label'          => __( 'Image uploader demo', 'slug' ),
				'section'        => 'slug_new_section',
				'settings'       => 'slug_theme_options[image_uploader_demo]',
			)
		)
	);
}
add_action( 'customize_register', 'slug_register_new_customisation' );
?>