From 75f45b17a67462594edb47951bb2647b96a81ed5 Mon Sep 17 00:00:00 2001 From: Blue Triangle <58819229+AoSankaku@users.noreply.github.com> Date: Thu, 25 Dec 2025 22:08:04 +0900 Subject: [PATCH 1/2] Add fetchpriority prop to YouTube component --- packages/astro-embed-youtube/YouTube.astro | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/astro-embed-youtube/YouTube.astro b/packages/astro-embed-youtube/YouTube.astro index 6f1375bc..9b7fc1e4 100644 --- a/packages/astro-embed-youtube/YouTube.astro +++ b/packages/astro-embed-youtube/YouTube.astro @@ -8,6 +8,7 @@ export interface Props extends astroHTML.JSX.HTMLAttributes { posterQuality?: 'max' | 'high' | 'default' | 'low'; params?: string; playlabel?: string; + fetchpriority?: 'high' | 'low' | 'auto'; } const { @@ -16,6 +17,7 @@ const { posterQuality = 'default', title, style, + fetchpriority = 'auto', ...attrs } = Astro.props as Props; @@ -47,6 +49,7 @@ if (posterURL) styles.push(`background-image: url('${posterURL}')`); {videoid} {title} data-title={title} + fetchpriority={fetchpriority} {...attrs} style={styles.join(';')} > From c37007d1ee601120b9132ee1039c1f0b10bc4980 Mon Sep 17 00:00:00 2001 From: Blue Triangle <58819229+AoSankaku@users.noreply.github.com> Date: Thu, 1 Jan 2026 14:36:09 +0000 Subject: [PATCH 2/2] Add actual prefetch for image --- packages/astro-embed-youtube/YouTube.astro | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/astro-embed-youtube/YouTube.astro b/packages/astro-embed-youtube/YouTube.astro index 9b7fc1e4..06408407 100644 --- a/packages/astro-embed-youtube/YouTube.astro +++ b/packages/astro-embed-youtube/YouTube.astro @@ -45,6 +45,13 @@ if (style) styles.push(style); if (posterURL) styles.push(`background-image: url('${posterURL}')`); --- + +