diff --git a/.replit b/.replit index d2b4742..a194fdb 100644 --- a/.replit +++ b/.replit @@ -26,6 +26,10 @@ externalPort = 3002 localPort = 35385 externalPort = 6800 +[[ports]] +localPort = 36725 +externalPort = 8000 + [[ports]] localPort = 37431 externalPort = 5000 diff --git a/replit.md b/replit.md index 74aa127..d067604 100644 --- a/replit.md +++ b/replit.md @@ -24,7 +24,12 @@ The backend runs on **Node.js** with **Express.js**, fully implemented in **Type ### Media Processing Pipeline -The platform leverages **Cloudinary** for cloud-based image and video storage and transformation. Original files are uploaded to Cloudinary, which then automatically generates transformation URLs for various platform-specific formats (e.g., Facebook Feed: 1200x630px, Instagram Feed: 1080x1080px, Instagram Story: 1080x1920px). These public IDs and transformation URLs are stored in the database, allowing optimized images to be served via Cloudinary's CDN. +The platform leverages **Cloudinary** for cloud-based image and video storage and transformation. Original files are uploaded to Cloudinary, which then automatically generates transformation URLs for various platform-specific formats: +- **Facebook Feed**: 1080x1080px with intelligent center crop (`crop: fill`) - square format, no borders +- **Instagram Feed**: 1080x1080px with padding (`crop: pad`) - maintains aspect ratio with auto background +- **Instagram Story**: 1080x1920px with padding (`crop: pad`) - vertical format + +These public IDs and transformation URLs are stored in the database, allowing optimized images to be served via Cloudinary's CDN. ### Authentication & Authorization diff --git a/server/services/cloudinary.ts b/server/services/cloudinary.ts index e22da9f..964b6f7 100644 --- a/server/services/cloudinary.ts +++ b/server/services/cloudinary.ts @@ -33,7 +33,7 @@ class CloudinaryService { // Define eager transformations for images (generated during upload) const eagerTransformations = !isVideo ? [ - { width: 1200, height: 630, crop: 'pad', gravity: 'center', background: 'auto' }, // Facebook Feed + { width: 1080, height: 1080, crop: 'fill', gravity: 'center' }, // Facebook Feed (square, no borders) { width: 1080, height: 1080, crop: 'pad', gravity: 'center', background: 'auto' }, // Instagram Feed { width: 1080, height: 1920, crop: 'pad', gravity: 'center', background: 'auto' } // Instagram Story ] : undefined;