From 67e85175ff3a95a508e06f5656386bb6106305a0 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Thu, 2 Oct 2025 11:46:41 +0000 Subject: [PATCH] Improve image transformations for social media posts Update Cloudinary service to include 'gravity: center' and 'background: black' for Facebook and Instagram feed/story image transformations. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/g8ompNP --- server/services/cloudinary.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/services/cloudinary.ts b/server/services/cloudinary.ts index 5668ff4..9e18d69 100644 --- a/server/services/cloudinary.ts +++ b/server/services/cloudinary.ts @@ -33,9 +33,9 @@ class CloudinaryService { // Define eager transformations for images (generated during upload) const eagerTransformations = !isVideo ? [ - { width: 1200, height: 630, crop: 'pad', background: 'auto' }, // Facebook Feed - { width: 1080, height: 1080, crop: 'pad', background: 'auto' }, // Instagram Feed - { width: 1080, height: 1920, crop: 'pad', background: 'auto' } // Instagram Story + { width: 1200, height: 630, crop: 'pad', gravity: 'center', background: 'black' }, // Facebook Feed + { width: 1080, height: 1080, crop: 'pad', gravity: 'center', background: 'black' }, // Instagram Feed + { width: 1080, height: 1920, crop: 'pad', gravity: 'center', background: 'black' } // Instagram Story ] : undefined; // Upload to Cloudinary with eager transformations