diff --git a/apps/scandic-web/next.config.ts b/apps/scandic-web/next.config.ts index bd461411a..77d722107 100644 --- a/apps/scandic-web/next.config.ts +++ b/apps/scandic-web/next.config.ts @@ -56,7 +56,7 @@ const nextConfig = { }, images: { minimumCacheTTL: 2678400, // 31 days - deviceSizes: [320, 420, 768, 1024, 1200, 2400], + deviceSizes: [320, 420, 768, 900, 1024, 1200, 2400], imageSizes: [200, 400, 800, 1200, 1920], remotePatterns: [ { diff --git a/packages/design-system/lib/components/Image.tsx b/packages/design-system/lib/components/Image.tsx index 0eba7aaec..b4728a40f 100644 --- a/packages/design-system/lib/components/Image.tsx +++ b/packages/design-system/lib/components/Image.tsx @@ -22,6 +22,10 @@ function imageLoader({ quality, src, width }: ImageLoaderProps) { const isAbsoluteUrl = src.startsWith('https://') || src.startsWith('http://') const hasQS = src.indexOf('?') !== -1 + if (width < 500) { + width += 150 // HACK! Slightly increase width for better quality + } + if (isAbsoluteUrl) { return `https://img.scandichotels.com/.netlify/images?url=${src}&w=${width}${quality ? '&q=' + quality : ''}` }