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
This commit is contained in:
michaelschal committed 2025-10-02 11:46:41 +00:00
1 parent cee18e9891
commit 67e85175ff
1 file changed
+3 -3
+3 -3
View File
@@ -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