diff --git a/packages/starlight/components/SiteTitle.astro b/packages/starlight/components/SiteTitle.astro
index 2f4b829943e..14cf87c2d34 100644
--- a/packages/starlight/components/SiteTitle.astro
+++ b/packages/starlight/components/SiteTitle.astro
@@ -2,6 +2,7 @@
import { logos } from 'virtual:starlight/user-images';
import config from 'virtual:starlight/user-config';
import type { Props } from '../props';
+import { Image } from 'astro:assets';
const { siteTitle, siteTitleHref } = Astro.props;
---
@@ -9,22 +10,45 @@ const { siteTitle, siteTitleHref } = Astro.props;
{
config.logo && logos.dark && (
<>
-
- {/* Show light alternate if a user configure both light and dark logos. */}
- {!('src' in config.logo) && (
+ {logos.dark.format === 'svg' ? (
+ ) : (
+
+ )}
+ {!('src' in config.logo) && logos.light && (
+ <>
+ {logos.light.format === 'svg' ? (
+
+ ) : (
+
+ )}
+ >
)}
>
)