Image Optimization
draftA dedicated Lambda handles /_next/image resizing using a WASM resizer (provided.al2023). Resized variants are cached at CloudFront.
Source reference: cli/internal/serverless/aws_image_lambda.go
Why a separate Lambda
TODO isolates image work from main runtime, avoids 250 MB bundle bloat from sharp.
Resizer implementation
TODO WASM-based, CPU / memory profile, supported formats.
CloudFront cache key
TODO how query strings are handled (size, quality, format), known caveat to verify.
Supported next/image features
TODO sizes, quality, formats (AVIF / WebP),
remotePatternsfromnext.config.js.
External image origins
TODO
remotePatternsconfig, what NextDeploy detects from build output.
Disabling image optimization
TODO
unoptimized: truein next.config or full bypass via passthrough policy.