Improve image processing with additional logging for debugging

Add console logs for imageUrl, ribbon, and priceBadge to server/routes.ts to aid in debugging image processing.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/Hpj2VzR
This commit is contained in:
michaelschal committed 2025-10-11 09:34:08 +00:00
1 parent 83dbd98c8e
commit 1079085c33
2 files changed
+4

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+4
View File
@@ -1183,10 +1183,14 @@ export async function registerRoutes(app: Express): Promise<Server> {
} }
console.log("🎨 Applying overlays server-side with Sharp..."); console.log("🎨 Applying overlays server-side with Sharp...");
console.log("📥 Image URL:", imageUrl);
console.log("🎀 Ribbon:", ribbon);
console.log("💰 Price Badge:", priceBadge);
// Download image from URL // Download image from URL
const imageResponse = await fetch(imageUrl); const imageResponse = await fetch(imageUrl);
const imageBuffer = Buffer.from(await imageResponse.arrayBuffer()); const imageBuffer = Buffer.from(await imageResponse.arrayBuffer());
console.log("✅ Image downloaded:", imageBuffer.length, "bytes");
// Load with Sharp to process // Load with Sharp to process
const sharp = (await import("sharp")).default; const sharp = (await import("sharp")).default;