From c6a1f080c6f52580fee2cb490e8f9ac3cd6a6468 Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Wed, 16 Sep 2026 18:12:35 -0600 Subject: [PATCH 1/2] perf: lazy-load MDX images ZoomableImage renders every doc image eagerly, so a long page downloads every screenshot on it before first paint. loading="lazy" defers the ones below the fold until the reader scrolls near them. Amp-Thread-ID: https://ampcode.com/threads/T-01a0b274-3173-77ed-8f71-82301b157a16 Co-authored-by: Amp --- src/components/mdx/ZoomableImage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/mdx/ZoomableImage.tsx b/src/components/mdx/ZoomableImage.tsx index ef395215c..1ad752aea 100644 --- a/src/components/mdx/ZoomableImage.tsx +++ b/src/components/mdx/ZoomableImage.tsx @@ -32,6 +32,7 @@ export function ZoomableImage({className, alt, ...props}: ZoomableImageProps) { {alt} From f6911a6a56d5a371e4dbc6bed4382cde407d2b9f Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Thu, 17 Sep 2026 21:01:14 -0600 Subject: [PATCH 2/2] todo: track WebP image optimizer follow-up Amp-Thread-ID: https://ampcode.com/threads/T-01a0b274-3173-77ed-8f71-82301b157a16 Co-authored-by: Amp --- dev/TODO.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dev/TODO.md b/dev/TODO.md index 73ff2cea5..6431cd3bc 100644 --- a/dev/TODO.md +++ b/dev/TODO.md @@ -14,3 +14,9 @@ "Generating static pages" time (locally 6.6s with them, 3.6s without). Options: hoist the font and logo reads in `src/app/api/og/[...path]/route.tsx` to module scope, or render one image per top-level section instead of per page +- Serve MDX screenshots as WebP through `/_next/image`: branch + `marc/perf/webp-images` (split out of #1975) routes allow-listed GCS + PNG/JPEGs through Next's image optimizer, 1214 KB → 214 KB on + `/batch-changes/delete-a-batch-change`. Needs a decision on the Vercel + Image Optimization bill (~360 source images, one transform per week per + region) before it goes up as a PR