Index: src/wp-content/themes/twentyseventeen/assets/js/customize-preview.js
===================================================================
--- src/wp-content/themes/twentyseventeen/assets/js/customize-preview.js	(revision 39093)
+++ src/wp-content/themes/twentyseventeen/assets/js/customize-preview.js	(working copy)
@@ -6,6 +6,8 @@
 
 ( function( $ ) {
 
+	var settings = _twentyseventeenCustomizePreviewSettings;
+
 	// Collect information from customize-controls.js about which panels are opening
 	wp.customize.bind( 'preview-ready', function() {
 		wp.customize.preview.bind( 'section-highlight', function( data ) {
@@ -102,4 +104,32 @@
 			}
 		} );
 	} );
+
+	// Whether a header image is available.
+	function hasHeaderImage() {
+		var image = wp.customize( 'header_image' )();
+		return '' !== image && 'remove-header' !== image;
+	}
+
+	// Whether a header video is available.
+	function hasHeaderVideo() {
+		var externalVideo = wp.customize( 'external_header_video' )(),
+			video = wp.customize( 'header_video' )();
+
+		return '' !== externalVideo || ( 0 !== video && '' !== video );
+	}
+
+	// Toggle a body class if a custom header exists.
+	$.each( [ 'external_header_video', 'header_image', 'header_video' ], function( index, settingId ) {
+		wp.customize( settingId, function( setting ) {
+			setting.bind(function() {
+				if ( hasHeaderImage() || ( hasHeaderVideo() && !! settings.isFrontPage ) ) {
+					$( document.body ).addClass( 'has-header-image' );
+				} else {
+					$( document.body ).removeClass( 'has-header-image' );
+				}
+			} );
+		} );
+	} );
+
 } )( jQuery );
Index: src/wp-content/themes/twentyseventeen/inc/customizer.php
===================================================================
--- src/wp-content/themes/twentyseventeen/inc/customizer.php	(revision 39093)
+++ src/wp-content/themes/twentyseventeen/inc/customizer.php	(working copy)
@@ -200,6 +200,16 @@
 add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' );
 
 /**
+ * Export data for the Twenty Seventeen Customize preview script.
+ */
+function twentyseventeen_export_customize_preview_data() {
+	wp_localize_script( 'twentyseventeen-customize-preview', '_twentyseventeenCustomizePreviewSettings', array(
+		'isFrontPage' => twentyseventeen_is_frontpage(),
+	) );
+}
+add_action( 'wp_enqueue_scripts', 'twentyseventeen_export_customize_preview_data' );
+
+/**
  * Load dynamic logic for the customizer controls area.
  */
 function twentyseventeen_panels_js() {
