Figma tools for asset preparation and image variants
I built two Figma plugins for recurring canvas work: normalizing mixed assets into consistent Auto Layout frames, and taking a selected master through image generation, format fitting, and placement back in Figma.
Normalize a selection with one sizing rule
Mass Auto layout wraps selected nodes in square Auto Layout frames. The designer chooses a target size, proportional sizing or padding, rounding, and a background. Wrapper names can follow the source node or a component’s variant property, keeping the resulting assets identifiable.
The implementation skips locked nodes and can skip nodes already contained in a single-child Auto Layout wrapper. That matters when preparing a mixed selection: the same operation can leave already-prepared assets alone instead of nesting them again.
Generate by aspect ratio, then fit the formats
NanoBanana Batch starts with a selected frame or component and exports it as a PNG master. Its Google image-generation path sends that master with the prompt. Requested output sizes are grouped by aspect ratio, with one generated image reused for the matching sizes.
The plugin then fits each result to its target dimensions. Cover and contain modes let the designer choose between cropping and keeping the whole image with padding. The separate OpenAI path uses text-prompt generation, so it does not carry the same master-image input.
- selected master plus prompt
- Google path
- text-prompt generation
- OpenAI path
- fit results to the requested formats
- Cover / contain
Return results to a usable canvas
Generated images are placed in named rectangles inside an Auto Layout results container, then selected and brought into view. Export handling caps image dimensions and pixel count and retries at a smaller scale after an export failure; placement handles individual image errors without discarding the other results.
The case describes the archived implementation; provider integrations have not been retested against current APIs.