From 5763a426341551066308d3f3857ee213a2d70d98 Mon Sep 17 00:00:00 2001 From: Jacob Fletcher Date: Mon, 16 Dec 2024 14:59:33 -0500 Subject: [PATCH 1/2] adds priority to hero images --- templates/website/src/heros/HighImpact/index.tsx | 8 +------- templates/website/src/heros/MediumImpact/index.tsx | 2 +- templates/website/src/heros/PostHero/index.tsx | 2 +- .../with-vercel-website/src/heros/HighImpact/index.tsx | 8 +------- .../with-vercel-website/src/heros/MediumImpact/index.tsx | 2 +- .../with-vercel-website/src/heros/PostHero/index.tsx | 2 +- 6 files changed, 6 insertions(+), 18 deletions(-) diff --git a/templates/website/src/heros/HighImpact/index.tsx b/templates/website/src/heros/HighImpact/index.tsx index 968e1a408de..5ecd063f7c6 100644 --- a/templates/website/src/heros/HighImpact/index.tsx +++ b/templates/website/src/heros/HighImpact/index.tsx @@ -38,13 +38,7 @@ export const HighImpactHero: React.FC = ({ links, media, richText
{media && typeof media === 'object' && ( - + )}
diff --git a/templates/website/src/heros/MediumImpact/index.tsx b/templates/website/src/heros/MediumImpact/index.tsx index 7c5efc57974..5a5248ea8a0 100644 --- a/templates/website/src/heros/MediumImpact/index.tsx +++ b/templates/website/src/heros/MediumImpact/index.tsx @@ -30,7 +30,7 @@ export const MediumImpactHero: React.FC = ({ links, media, richTex diff --git a/templates/website/src/heros/PostHero/index.tsx b/templates/website/src/heros/PostHero/index.tsx index 128180e6d3e..f0241b5dc15 100644 --- a/templates/website/src/heros/PostHero/index.tsx +++ b/templates/website/src/heros/PostHero/index.tsx @@ -66,7 +66,7 @@ export const PostHero: React.FC<{ {heroImage && typeof heroImage !== 'string' && ( = ({ links, media, richText
{media && typeof media === 'object' && ( - + )}
diff --git a/templates/with-vercel-website/src/heros/MediumImpact/index.tsx b/templates/with-vercel-website/src/heros/MediumImpact/index.tsx index 7c5efc57974..5a5248ea8a0 100644 --- a/templates/with-vercel-website/src/heros/MediumImpact/index.tsx +++ b/templates/with-vercel-website/src/heros/MediumImpact/index.tsx @@ -30,7 +30,7 @@ export const MediumImpactHero: React.FC = ({ links, media, richTex diff --git a/templates/with-vercel-website/src/heros/PostHero/index.tsx b/templates/with-vercel-website/src/heros/PostHero/index.tsx index 128180e6d3e..f0241b5dc15 100644 --- a/templates/with-vercel-website/src/heros/PostHero/index.tsx +++ b/templates/with-vercel-website/src/heros/PostHero/index.tsx @@ -66,7 +66,7 @@ export const PostHero: React.FC<{ {heroImage && typeof heroImage !== 'string' && ( Date: Mon, 16 Dec 2024 16:06:47 -0500 Subject: [PATCH 2/2] removes lazy loading strategy as this disregards priority --- templates/website/src/heros/HighImpact/index.tsx | 2 +- templates/website/src/heros/MediumImpact/index.tsx | 1 - templates/website/src/heros/PostHero/index.tsx | 8 +------- .../with-vercel-website/src/heros/HighImpact/index.tsx | 2 +- .../with-vercel-website/src/heros/MediumImpact/index.tsx | 1 - .../with-vercel-website/src/heros/PostHero/index.tsx | 8 +------- 6 files changed, 4 insertions(+), 18 deletions(-) diff --git a/templates/website/src/heros/HighImpact/index.tsx b/templates/website/src/heros/HighImpact/index.tsx index 5ecd063f7c6..ae4d9f1aebd 100644 --- a/templates/website/src/heros/HighImpact/index.tsx +++ b/templates/website/src/heros/HighImpact/index.tsx @@ -38,7 +38,7 @@ export const HighImpactHero: React.FC = ({ links, media, richText
{media && typeof media === 'object' && ( - + )}
diff --git a/templates/website/src/heros/MediumImpact/index.tsx b/templates/website/src/heros/MediumImpact/index.tsx index 5a5248ea8a0..14639a8f767 100644 --- a/templates/website/src/heros/MediumImpact/index.tsx +++ b/templates/website/src/heros/MediumImpact/index.tsx @@ -31,7 +31,6 @@ export const MediumImpactHero: React.FC = ({ links, media, richTex className="-mx-4 md:-mx-8 2xl:-mx-16" imgClassName="" priority - loading="lazy" resource={media} /> {media?.caption && ( diff --git a/templates/website/src/heros/PostHero/index.tsx b/templates/website/src/heros/PostHero/index.tsx index f0241b5dc15..905396cb083 100644 --- a/templates/website/src/heros/PostHero/index.tsx +++ b/templates/website/src/heros/PostHero/index.tsx @@ -64,13 +64,7 @@ export const PostHero: React.FC<{
{heroImage && typeof heroImage !== 'string' && ( - + )}
diff --git a/templates/with-vercel-website/src/heros/HighImpact/index.tsx b/templates/with-vercel-website/src/heros/HighImpact/index.tsx index 5ecd063f7c6..ae4d9f1aebd 100644 --- a/templates/with-vercel-website/src/heros/HighImpact/index.tsx +++ b/templates/with-vercel-website/src/heros/HighImpact/index.tsx @@ -38,7 +38,7 @@ export const HighImpactHero: React.FC = ({ links, media, richText
{media && typeof media === 'object' && ( - + )}
diff --git a/templates/with-vercel-website/src/heros/MediumImpact/index.tsx b/templates/with-vercel-website/src/heros/MediumImpact/index.tsx index 5a5248ea8a0..14639a8f767 100644 --- a/templates/with-vercel-website/src/heros/MediumImpact/index.tsx +++ b/templates/with-vercel-website/src/heros/MediumImpact/index.tsx @@ -31,7 +31,6 @@ export const MediumImpactHero: React.FC = ({ links, media, richTex className="-mx-4 md:-mx-8 2xl:-mx-16" imgClassName="" priority - loading="lazy" resource={media} /> {media?.caption && ( diff --git a/templates/with-vercel-website/src/heros/PostHero/index.tsx b/templates/with-vercel-website/src/heros/PostHero/index.tsx index f0241b5dc15..905396cb083 100644 --- a/templates/with-vercel-website/src/heros/PostHero/index.tsx +++ b/templates/with-vercel-website/src/heros/PostHero/index.tsx @@ -64,13 +64,7 @@ export const PostHero: React.FC<{
{heroImage && typeof heroImage !== 'string' && ( - + )}