Skip to content

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.

ModelSource
sonnetpack: ad-assets
Full Reference

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.

FactValue
Meta placements4 (feed_square, feed_portrait, stories_vertical, link_landscape)
Pinterest placements2 (standard_pin, square_pin)
Google placements3 (landscape, square, medium_rectangle)
Total placements9 per asset
before_after on GoogleExcluded by default — configurable
Skipped variant url'' (empty string) — filtered by sync-to-cloudinary
Output filevariant-manifest.json
I want to…File
Look up exact pixel dimensions for any Meta, Pinterest, or Google placementplatform-sizes.md
Implement TOS routing, dimension validation, and full generateVariants functiontos-routing.md
Understand the VariantManifest output shape, skippedReason values, and pipeline positionvariant-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.


┏━ 🎯 generate-ad-variants ━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Generating variants: [N] assets → [platform(s)] ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛