From db061fdc10d38880bceea7689160c74985cdbe36 Mon Sep 17 00:00:00 2001 From: Krystof Date: Tue, 5 Nov 2024 03:28:19 +0100 Subject: [PATCH] refactor(web): image optimization --- apps/web/next.config.mjs | 2 ++ apps/web/src/app/not-found.tsx | 7 +++++-- apps/web/src/app/page.tsx | 11 ++++++++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index d8e0a4ee..38a7f795 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -6,6 +6,8 @@ const nextConfig = { pageExtensions: ["js", "jsx", "md", "mdx", "ts", "tsx"], images: { formats: ["image/avif", "image/webp"], + deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840], + imageSizes: [16, 32, 48, 64, 96, 128, 256, 384], }, }; diff --git a/apps/web/src/app/not-found.tsx b/apps/web/src/app/not-found.tsx index b3d28c53..cf0a0d85 100644 --- a/apps/web/src/app/not-found.tsx +++ b/apps/web/src/app/not-found.tsx @@ -27,9 +27,12 @@ const NotFoundPage = () => { className="font-bold text-zinc-800 text-5xl flex items-center gap-2" > Icon Metro Now diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsx index b687fd14..2acb6151 100644 --- a/apps/web/src/app/page.tsx +++ b/apps/web/src/app/page.tsx @@ -21,9 +21,12 @@ const LandingPage = () => {

Icon Metro Now!

@@ -37,6 +40,7 @@ const LandingPage = () => { className="mt-4" alt="Download on App Store" height={50} + priority />
@@ -44,9 +48,10 @@ const LandingPage = () => { src={MetroNowWatch} alt="Apple watch screenshots" height={1200} + placeholder="blur" + quality={90} priority /> -