Index: src/wp-includes/general-template.php
===================================================================
--- src/wp-includes/general-template.php	(revision 37300)
+++ src/wp-includes/general-template.php	(working copy)
@@ -879,12 +879,23 @@
 
 	// We have a logo. Logo is go.
 	if ( $custom_logo_id ) {
+		$img = wp_get_attachment_image( $custom_logo_id, 'full', false, array(
+			'class'    => 'custom-logo',
+			'itemprop' => 'logo',
+		) );
+
+		/**
+		 * Filter the custom logo image tag.
+		 *
+		 * @param string $img Custom logo image tag.
+		 * @param string $blog_id ID of the blog in question.
+		 * @param string $custom_logo_id Custom logo attachment ID.
+		 */
+		$img = apply_filters( 'get_custom_logo_img', $img, $blog_id, $custom_logo_id );
+
 		$html = sprintf( '<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>',
 			esc_url( home_url( '/' ) ),
-			wp_get_attachment_image( $custom_logo_id, 'full', false, array(
-				'class'    => 'custom-logo',
-				'itemprop' => 'logo',
-			) )
+			$img
 		);
 	}
 
