# computeVariantDimensions

```ts
function computeVariantDimensions(asset, preset): 
  | {
  height: number;
  width: number;
}
  | null;
```

Defined in: packages/asset-client/dist/index.d.ts:1192

Compute the dimensions a variant would have given the source asset's
width/height and the variant's bounding box. For thumbnails (square
smart-crop) the result is always 256×256; for the other presets, scales
the max side to the box dimension and the other side proportionally.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `asset` | [`Pick`](/api/nitida/sdk/react/-internal-/type-aliases/pick/)\<[`AssetDTO`](/api/nitida/sdk/type-aliases/assetdto/), `"w"` \| `"h"`\> |
| `preset` | [`VariantPreset`](/api/nitida/sdk/type-aliases/variantpreset/) |

## Returns

  \| \{
  `height`: `number`;
  `width`: `number`;
\}
  \| `null`