Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review (codex): auto-orient (EXIF .rotate) uploaded headshots before PNG re-encode (#1327)
[._.]/ Adam Eivy6f513ced1a5c
diff --git a/server/services/imageGen/local.js b/server/services/imageGen/local.jsindex 9dbcbe8feb..ab40954363 100644--- a/server/services/imageGen/local.js+++ b/server/services/imageGen/local.js@@ -864,7 +864,9 @@ export async function saveUploadedGalleryImage(base64Data) {throw new ServerError('Unsupported image format (expected PNG, JPEG, WebP, or GIF)', { status: 400, code: 'UNSUPPORTED_IMAGE' });}// Normalize to PNG so the gallery's PNG-only list/delete paths manage it.- const png = await sharp(buffer).png().toBuffer();+ // `.rotate()` with no args bakes in EXIF orientation before the metadata is+ // dropped, so a camera-JPEG portrait isn't saved sideways/upside-down.+ const png = await sharp(buffer).rotate().png().toBuffer();const filename = `upload-${randomUUID().slice(0, 8)}.png`;await ensureDir(PATHS.images);await writeFile(join(PATHS.images, filename), png);