From e367d87938e1d1415828701c405966e0e92940cb Mon Sep 17 00:00:00 2001 From: Bart Stefanski Date: Sat, 24 Feb 2024 23:15:30 +0100 Subject: [PATCH] chore: adjust image optimization settings --- apps/web/next.config.mjs | 3 ++- apps/web/views/Search/HitsSection.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index b68f9cd9..3778f1c2 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -15,7 +15,8 @@ const config = withPlugins([[withBundleAnalyzer({ enabled: process.env.ANALYZE = }, experimental: { ppr: true }, images: { - deviceSizes: [640, 750, 828, 1080, 1200], + deviceSizes: [320, 640, 750, 828, 1080, 1200], + minimumCacheTTL: 31_556_926, formats: ["image/avif", "image/webp"], remotePatterns: [ { diff --git a/apps/web/views/Search/HitsSection.tsx b/apps/web/views/Search/HitsSection.tsx index d4837b7a..91d1a55a 100644 --- a/apps/web/views/Search/HitsSection.tsx +++ b/apps/web/views/Search/HitsSection.tsx @@ -24,7 +24,7 @@ export async function HitsSection({ hits }: HitsSectionProps) { aspectRatio: "400/300", objectFit: "contain", }} - sizes="400px" + sizes="300px" width={400} priority={idx === 0} />