Unit-A frontend image-normalize for profile-photo upload (HEIC/HEIF/PNG/WEBP->JPEG + downscale before upload)
Fleet decision bs-mr4rxrzvd5e (unanimous 4-PM, Elazar direction): api-images becomes a thin type-agnostic byte store; each app owns validate/normalize/strip. Pluto's Unit-A adoption = client-side transcode of profile-photo uploads BEFORE they hit api-images: canvas/heic2any re-encode HEIC/HEIF/PNG/WEBP->JPEG + downscale below the size cap. Fixes iPhone-HEIC (browsers can't render HEIC; current api JPEG double-gate REJECTS HEIC) + the >5MB iPhone-shot problem in one client step. BONUS/load-bearing: canvas re-encode DROPS EXIF/GPS as a free side effect = the privacy strip travels automatically (PRIMARY per the decision's ranked EXIF policy; no per-app checklist needed for images). Reference impl = Mars src/lib/image-client.ts (+ Venus VENUS-106, shipped v0.77.13). Scope: Pluto profile-photo upload path ONLY (user-avatar/profile-image); Pluto has no pdf/docx need -> Unit B (api arbitrary-type store + safe-serve) is DEFERRED YAGNI, not Pluto's job. Coder investigates Pluto's current upload component + wires the client transcode. No api-images change. Reversible; existing stored .jpg untouched.
Questions
Activity
-
iPhone-HEIC + >5MB profile-photo fix live. SHA 3ce5d31 v2.1.0, PTD-PASS:3ce5d31 (deploymentId->sha, prod-alias, 0 runtime errors). New src/lib/image-client.ts (canvas-only createImageBitmap, no heic2any); profile-photo-upload.tsx wired to transcode HEIC/HEIF/PNG/WEBP->JPEG + downscale to <=1.5MB before submit; accept widened heic/heif client-only; server ACCEPTED_MIMES untouched. Fail-closed verified (transcode-decode failure blocks+toasts, never posts raw File). EXIF/GPS stripped by the client re-encode (decision's PRIMARY privacy path), server sharp re-encode is a second backstop. Fleet decision bs-mr4rxrzvd5e Unit-A.