From 401d66b3d460c76e831a15165af4899e32118910 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Wed, 8 Jul 2026 18:23:00 -0700 Subject: [PATCH] hotfix(landing): revert unoptimized removal, compress source images instead PR #5522 removed `unoptimized` from local blog/library/integration cover images, expecting next/image's runtime optimizer to serve resized AVIF/WebP. On staging, images broke entirely on /blog - the runtime optimizer is failing there (root cause still under investigation: _next/image requests aren't captured by the app's structured logger, so the underlying error wasn't visible in application logs). Reverting `unoptimized` immediately restores working images. In its place, this compresses the actual source files (mozjpeg quality 82 for JPEGs, palette PNG for PNGs) at their EXACT existing pixel dimensions - verified programmatically per-file (dimension mismatch aborts the write) and spot-checked visually. This gets the same bandwidth/LCP win the runtime optimizer was meant to provide, without depending on it: - 13 blog/library cover images + 3 author avatars + 1 brand logo - ~1.72MB -> ~1.02MB combined (~41% smaller), zero resolution change --- .../content-author-page.tsx | 1 + .../content-index-page/content-index-page.tsx | 2 ++ .../content-post-page/content-post-page.tsx | 2 ++ .../integrations/(shell)/[slug]/page.tsx | 1 + apps/sim/public/authors/emir.jpg | Bin 29999 -> 11943 bytes apps/sim/public/authors/sid.jpg | Bin 199738 -> 18655 bytes apps/sim/public/authors/waleed.jpg | Bin 26997 -> 10927 bytes apps/sim/public/blog/copilot/cover.png | Bin 197514 -> 65330 bytes apps/sim/public/blog/enterprise/cover.jpg | Bin 81282 -> 58431 bytes apps/sim/public/blog/executor/cover.jpg | Bin 115477 -> 90742 bytes apps/sim/public/blog/mothership/cover.png | Bin 402354 -> 247198 bytes apps/sim/public/blog/multiplayer/cover.jpg | Bin 111132 -> 84800 bytes apps/sim/public/blog/series-a/cover.jpg | Bin 22021 -> 14668 bytes apps/sim/public/blog/v0-5/cover.jpg | Bin 127395 -> 99601 bytes apps/sim/public/brandbook/logo/small.png | Bin 17424 -> 6529 bytes .../public/library/ai-agent-ideas/cover.jpg | Bin 137496 -> 107385 bytes .../library/ai-agent-vs-chatbot/cover.jpg | Bin 54646 -> 40537 bytes .../public/library/ai-agents-vs-rpa/cover.jpg | Bin 52100 -> 37414 bytes .../best-zapier-alternatives/cover.jpg | Bin 38369 -> 27044 bytes .../how-to-create-an-ai-agent/cover.jpg | Bin 55996 -> 40106 bytes .../library/openai-vs-n8n-vs-sim/cover.jpg | Bin 133418 -> 103037 bytes 21 files changed, 6 insertions(+) diff --git a/apps/sim/app/(landing)/components/content-author-page/content-author-page.tsx b/apps/sim/app/(landing)/components/content-author-page/content-author-page.tsx index 229632757ce..e57ad9e3c64 100644 --- a/apps/sim/app/(landing)/components/content-author-page/content-author-page.tsx +++ b/apps/sim/app/(landing)/components/content-author-page/content-author-page.tsx @@ -55,6 +55,7 @@ export function ContentAuthorPage({ width={600} height={315} className='h-[160px] w-full object-cover transition-transform group-hover:scale-[1.02]' + unoptimized />
diff --git a/apps/sim/app/(landing)/components/content-index-page/content-index-page.tsx b/apps/sim/app/(landing)/components/content-index-page/content-index-page.tsx index 17b589ed834..3e304e9b5be 100644 --- a/apps/sim/app/(landing)/components/content-index-page/content-index-page.tsx +++ b/apps/sim/app/(landing)/components/content-index-page/content-index-page.tsx @@ -96,6 +96,7 @@ export function ContentIndexPage({ sizes='(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw' className='object-cover' priority={index < 3} + unoptimized />
@@ -157,6 +158,7 @@ export function ContentIndexPage({ fill sizes='140px' className='object-cover' + unoptimized />
diff --git a/apps/sim/app/(landing)/components/content-post-page/content-post-page.tsx b/apps/sim/app/(landing)/components/content-post-page/content-post-page.tsx index 3cc6ff442b4..358ec8a1416 100644 --- a/apps/sim/app/(landing)/components/content-post-page/content-post-page.tsx +++ b/apps/sim/app/(landing)/components/content-post-page/content-post-page.tsx @@ -53,6 +53,7 @@ export function ContentPostPage({ sizes='(max-width: 768px) 100vw, 450px' priority itemProp='image' + unoptimized />
@@ -141,6 +142,7 @@ export function ContentPostPage({ sizes='(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw' className='object-cover' loading='lazy' + unoptimized />
diff --git a/apps/sim/app/(landing)/integrations/(shell)/[slug]/page.tsx b/apps/sim/app/(landing)/integrations/(shell)/[slug]/page.tsx index 172e47fa31e..d0cdedffa71 100644 --- a/apps/sim/app/(landing)/integrations/(shell)/[slug]/page.tsx +++ b/apps/sim/app/(landing)/integrations/(shell)/[slug]/page.tsx @@ -914,6 +914,7 @@ export default async function IntegrationPage({ params }: { params: Promise<{ sl width={56} height={56} className='shrink-0 rounded-xl' + unoptimized />