---
layout: page
title: "Fit"
node_type: "nodetool.image.Fit"
namespace: "nodetool.image"
---

**Type:** `nodetool.image.Fit`

**Namespace:** `nodetool.image`

## Description

Resize an image to fit within specified dimensions while preserving aspect ratio.
    image, resize, fit

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| image | `image` | The image to fit. | `{"type":"image","uri":"","asset_id":null,"data"...` |
| width | `int` | Width to fit to. | `512` |
| height | `int` | Height to fit to. | `512` |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| output | `image` |  |

## Related Nodes

Browse other nodes in the [nodetool.image](../) namespace.
