diff --git src/wp-includes/general-template.php src/wp-includes/general-template.php
index 1995cca45f..44699eb36c 100644
--- src/wp-includes/general-template.php
+++ src/wp-includes/general-template.php
@@ -971,6 +971,17 @@ function get_custom_logo( $blog_id = 0 ) {
 			$custom_logo_attr['alt'] = get_bloginfo( 'name', 'display' );
 		}
 
+		/**
+		 * Filters the list of custom logo image attributes.
+		 *
+		 * @since 5.4.0
+		 *
+		 * @param string $custom_logo_attr Custom logo image attributes.
+		 * @param string $custom_logo_id   Custom logo attachment ID.
+		 * @param string $blog_id          ID of the blog to get the custom logo for.
+		 */
+		$custom_logo_attr = apply_filters( 'get_custom_logo_image_attributes', $custom_logo_attr, $custom_logo_id, $blog_id );
+
 		/*
 		 * If the alt attribute is not empty, there's no need to explicitly pass
 		 * it because wp_get_attachment_image() already adds the alt attribute.
