Scenario Resize Image and Resize Video: The Essentials
Last updated: August 28, 2026
Covers Scenario Resize Image (model_scenario-resize-image) and Scenario Resize Video (model_scenario-resize-video)
Scenario Resize Image and Scenario Resize Video are utility models for reformatting existing images and videos to exact pixel dimensions or a target file size, without regenerating any content. Both models now share a new fit parameter with three modes, contain, stretch, and cover, that control how the source is placed into the target width x height box whenever both dimensions are set.
Which Model Should I Use?
Model | Input | Best for |
|---|---|---|
Scenario Resize Image | 1 to 10 images | Batch resizing, thumbnails, fixed-dimension templates, upload size limits |
Scenario Resize Video | 1 video | Platform delivery specs, social crops, output format and frame rate conversion, file size caps |
Use Resize Image for stills and batches of up to 10 at once. Use Resize Video when the source is a video clip and you also need control over output format, frame rate, or audio.
How to Use the Model
The Fit Parameter: Contain, Stretch, and Cover
Both models share the same core dial: width, height, an optional maxSizeMb, and fit, which only matters when both width and height are set and the source does not already match that aspect ratio.
Contain (default) scales the source to fit entirely inside the width x height box, preserving the original aspect ratio. Nothing is cropped, but the output can land smaller than the requested box on one axis. Stretch forces the source to the exact width x height, distorting the image or video whenever the source aspect ratio differs from the target. Cover scales the source to fill the box completely and crops the overflow from the center, keeping the original aspect ratio with no distortion.
Resizing Images
The same 1536x1024 source photo resized into a 1024x1024 box with each fit mode:
{"width": 1024, "height": 1024, "fit": "contain"}fit: contain, output 1024x682 · Open on Scenario
{"width": 1024, "height": 1024, "fit": "stretch"}fit: stretch, output 1024x1024 · Open on Scenario
{"width": 1024, "height": 1024, "fit": "cover"}fit: cover, output 1024x1024 · Open on Scenario
A 1024x1536 portrait source resized into a 1600x900 landscape box, a common case when turning a phone-style photo into a banner:
{"width": 1600, "height": 900, "fit": "contain"}fit: contain, output 600x900 · Open on Scenario
{"width": 1600, "height": 900, "fit": "stretch"}fit: stretch, output 1600x900 · Open on Scenario
{"width": 1600, "height": 900, "fit": "cover"}fit: cover, output 1600x900 · Open on Scenario
Resizing Video
A 1280x720 landscape source clip resized into a 720x1280 vertical box, the kind of crop needed for Stories or Reels delivery:
{"width": 720, "height": 1280, "fit": "contain"}fit: contain, output 720x406 · Open on Scenario
{"width": 720, "height": 1280, "fit": "stretch"}fit: stretch, output 720x1280 · Open on Scenario
{"width": 720, "height": 1280, "fit": "cover"}fit: cover, output 720x1280 · Open on Scenario
Parameters
Shared by both models:
images / video
Required. Resize Image accepts an array of 1 to 10 images processed in the same call. Resize Video accepts exactly 1 video.
width
Target width in pixels. When only width is set, height is calculated automatically to preserve the source aspect ratio.
height
Target height in pixels. When only height is set, width is calculated automatically to preserve the source aspect ratio.
maxSizeMb
Maximum output file size in megabytes. The output is resized iteratively, while preserving aspect ratio, until it meets this cap. Combine with width and height, or use alone to just hit a file size target.
fit
Contain (default), stretch, or cover. Only takes effect when both width and height are set at the same time. See the examples above for the visual difference between the three modes.
Video-only:
videoOutputFormat
mp4 (default), mov, webm, or gif. When not specified, the original format is preserved.
frameRate
Target frame rate, 1 to 120 fps. When not specified, the original frame rate is preserved.
preserveAudio
true (default) or false. Set false to strip the audio track from the output, for example when preparing a silent background loop.
Use Cases
Thumbnails and profile images: resize any generated or uploaded asset into a fixed square without manually cropping in an external editor.
Social and platform crops: turn a landscape video into a vertical Reels or Shorts crop, or a portrait photo into a wide banner, with cover mode handling the crop automatically.
Fixed-dimension templates: batch-fit up to 10 images at once into the exact box a template, storefront, or marketplace listing requires.
Upload and delivery limits: use
maxSizeMbto hit a platform's file size ceiling without hand-tuning compression settings.Format conversion for video: convert a clip to MP4, MOV, WebM, or GIF and adjust frame rate in the same pass as the resize.
Clean input prep: normalize inconsistent source dimensions before feeding assets into another Scenario model that expects a fixed size.
Tips for Better Results
Default to contain when nothing may be cropped. It is the only mode of the three that guarantees the full source stays visible, at the cost of the output not always filling the exact box on both axes.
Reach for cover for thumbnails and grids. It fills the target box exactly with no distortion, which is what most thumbnail, avatar, and grid layouts actually need.
Avoid stretch unless the target genuinely tolerates distortion. It is the only mode that changes the source's proportions, visible almost immediately on anything with faces, circles, or straight lines.
Set both width and height to activate fit. If only one is set, the model always preserves aspect ratio automatically and the fit parameter has nothing to do.
Check the output dimensions after a contain resize. Because contain can shrink one axis below the requested size, do not assume the result always matches width x height exactly, unlike stretch and cover which always do.
Batch Resize Image instead of looping single calls. Passing up to 10 images in one
imagesarray is more efficient than calling the model once per image.Use maxSizeMb alone when only file size matters. It works independently of width and height for cases where the exact pixel dimensions do not matter, only the final file weight.
Known Limitations
Contain does not pad to the exact box. Unlike some resize tools, contain does not add letterbox or pillarbox bars to fill the remaining space. The output dimensions shrink to fit instead, so a caller expecting an exact width x height on every mode needs stretch or cover.
Cover always crops from the center. There is no parameter to bias the crop toward a specific edge or subject. If the subject sits off-center in the source, reframe it before resizing.
fit has no effect with only one dimension set. Set both width and height to see any difference between contain, stretch, and cover.
Resize Video processes one video per call. Unlike Resize Image's batch of up to 10, Resize Video's
videoarray is capped at a single clip.