face-center-crop
Use when generating smart-cropped image variants with face or subject centering via Cloudinary transformations. Produces portrait, square, landscape, and vertical crops optimized for ad platforms.
| Model | Source |
|---|---|
| sonnet | pack: ad-assets |
Full Reference
face-center-crop
Section titled “face-center-crop”Generates smart-cropped image variants using Cloudinary transformations. When classify-ad-assets reports faceDetected: true, uses g_face gravity to keep the subject’s face centered in the crop. Falls back to g_auto (content-aware auto-crop) when no face is detected. Produces four standard aspect ratio variants per asset, all auto-format and auto-quality optimized.
Quick Reference
Section titled “Quick Reference”| Fact | Value |
|---|---|
| Gravity (face detected) | g_face |
| Gravity (no face) | g_auto |
| Crop mode | c_fill |
| Format optimization | f_auto (webp/avif by browser) |
| Quality optimization | q_auto |
| Variants per asset | 4 (portrait, square, landscape, vertical) |
| Required env var | CLOUDINARY_CLOUD_NAME |
Reference Index
Section titled “Reference Index”| I want to… | File |
|---|---|
| Understand the transformation string, gravity selection, and URL builder | transformations.md |
| Run batch crop generation and integrate with classify-ad-assets | batch-generation.md |
Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.
Announcement
Section titled “Announcement”┏━ 🎯 face-center-crop ━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Cropping: [asset/batch] → [aspect ratios] ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛