Skip to main content
cm_pad_resize scales a video to fit inside a fixed box and pads the empty space so the full frame stays visible. Set the padding color with bg_ to avoid black letterboxing. Use it for consistent card sizes and fixed aspect-ratio layouts.

How to use it?

Set the box with w_ and h_, add cm_pad_resize, and choose a padding color with bg_. The example below fits the source into a 400×400 px box (w_400,h_400) with white padding.
Pair a blurred background (bg_blurred) with cm_pad_resize when you want the padding to echo the video instead of a flat color — it keeps a widescreen clip looking intentional inside a square card.

Next steps

Resize & aspect ratio

Compare pad resize with the crop fit mode and ratio tokens.

Video overview

Every video transform token in one reference.