Skip to content

fix: reduce next-image payload size#799

Open
raulvbrito wants to merge 1 commit into
Merit-Systems:masterfrom
raulvbrito:fix/next-image-413-payloads
Open

fix: reduce next-image payload size#799
raulvbrito wants to merge 1 commit into
Merit-Systems:masterfrom
raulvbrito:fix/next-image-413-payloads

Conversation

@raulvbrito
Copy link
Copy Markdown

Fixes #561.

This updates the templates/next-image flow so image payloads are not passed between the browser and Next routes as base64 JSON:

  • edit requests now send multipart File uploads instead of data URL JSON
  • large edit attachments are resized/re-encoded in the browser before upload
  • generate/edit routes return binary image responses instead of JSON-wrapped base64 data URLs
  • OpenAI edits receive uploaded File objects directly on the multipart path
  • legacy JSON edit requests remain supported for callers still sending data URLs

Validation:

  • corepack pnpm exec tsc --noEmit
  • corepack pnpm exec prettier --check ...
  • git diff --check
  • corepack pnpm run lint
  • corepack pnpm run build

next lint and next build still report the pre-existing warnings in src/app/page.tsx and src/components/logo.tsx.

/claim #561

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 12, 2026

@raulvbrito is attempting to deploy a commit to the Merit Systems Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

next-image template: Request Entity Too Large

1 participant