generate-ad-variants
Use when generating platform-specific image size variants for ad campaigns. Produces correctly sized crops for Meta, Pinterest, and Google Display with TOS-aware routing that excludes restricted content from specific platforms.
| Model | Source |
|---|---|
| sonnet | pack: ad-assets |
Full Reference
generate-ad-variants
Section titled “generate-ad-variants”Generates all required platform-specific image size variants using Cloudinary transformations. Consumes the deduplicated asset list from deduplicate-assets, applies TOS-aware routing to exclude restricted content from certain platforms, and outputs a variant manifest ready for sync-to-cloudinary.
Quick Reference
Section titled “Quick Reference”| Fact | Value |
|---|---|
| Meta placements | 4 (feed_square, feed_portrait, stories_vertical, link_landscape) |
| Pinterest placements | 2 (standard_pin, square_pin) |
| Google placements | 3 (landscape, square, medium_rectangle) |
| Total placements | 9 per asset |
| before_after on Google | Excluded by default — configurable |
| Skipped variant url | '' (empty string) — filtered by sync-to-cloudinary |
| Output file | variant-manifest.json |
Reference Index
Section titled “Reference Index”| I want to… | File |
|---|---|
| Look up exact pixel dimensions for any Meta, Pinterest, or Google placement | platform-sizes.md |
| Implement TOS routing, dimension validation, and full generateVariants function | tos-routing.md |
| Understand the VariantManifest output shape, skippedReason values, and pipeline position | variant-manifest.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”┏━ 🎯 generate-ad-variants ━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Generating variants: [N] assets → [platform(s)] ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛