diff --git a/templates/website/src/components/Media/ImageMedia/index.tsx b/templates/website/src/components/Media/ImageMedia/index.tsx index cb847ddbc25..bf2de6c8690 100644 --- a/templates/website/src/components/Media/ImageMedia/index.tsx +++ b/templates/website/src/components/Media/ImageMedia/index.tsx @@ -50,7 +50,7 @@ export const ImageMedia: React.FC = (props) => { src = `${getClientSideURL()}${url}` } - const loading = loadingFromProps || 'lazy' + const loading = loadingFromProps || (!priority ? 'lazy' : undefined) // NOTE: this is used by the browser to determine which image to download at different screen sizes const sizes = sizeFromProps diff --git a/templates/with-vercel-website/src/components/Media/ImageMedia/index.tsx b/templates/with-vercel-website/src/components/Media/ImageMedia/index.tsx index cb847ddbc25..bf2de6c8690 100644 --- a/templates/with-vercel-website/src/components/Media/ImageMedia/index.tsx +++ b/templates/with-vercel-website/src/components/Media/ImageMedia/index.tsx @@ -50,7 +50,7 @@ export const ImageMedia: React.FC = (props) => { src = `${getClientSideURL()}${url}` } - const loading = loadingFromProps || 'lazy' + const loading = loadingFromProps || (!priority ? 'lazy' : undefined) // NOTE: this is used by the browser to determine which image to download at different screen sizes const sizes = sizeFromProps