summaryrefslogtreecommitdiff
path: root/src/components/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/common')
-rw-r--r--src/components/common/Image.astro5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/components/common/Image.astro b/src/components/common/Image.astro
index d113b68..701d343 100644
--- a/src/components/common/Image.astro
+++ b/src/components/common/Image.astro
@@ -37,6 +37,11 @@ if (!props.decoding) {
props.decoding = 'async';
}
+// Add fetchpriority="high" for eager loading images (LCP optimization)
+if (props.loading === 'eager' && !props.fetchpriority) {
+ props.fetchpriority = 'high';
+}
+
const _image = await findImage(props.src);
let image: ImageType | undefined = undefined;