# ASSET\_SIZE

**The function ASSET\_SIZE takes a Detailed Asset and returns the size of the Asset in bytes.**

This function takes a [Detailed Asset](../../variable-data-types/the-asset-data-type/the-detailed-asset) as input. It returns a [Number](../../variable-data-types/the-number-variable-data-type): the size of the Asset in bytes.

#### Declaration

```javascript
ASSET_SIZE(detailed_asset) -> size
```

&#x20;

#### Parameters

**detailed\_asset** (required, type: [_Detailed Asset_](../../variable-data-types/the-asset-data-type/the-detailed-asset)) Any Detailed Asset. Note that a [Detailed Asset](../../variable-data-types/the-asset-data-type/the-detailed-asset) is a subcategory of an [Asset](../../variable-data-types/the-asset-data-type), and that the ASSET\_SIZE function will not accept a general Asset as input, only a Detailed Asset.

#### Return Values

**thumbnail\_url**(type: [_Number_](../../variable-data-types/the-number-variable-data-type))

The size of the given Detailed Asset in bytes.

#### Examples

Assume the example has access to the following Detailed Asset, **detailed\_asset**:

```javascript
detailed_asset -> {  
 "id": "9d65de10-e1d5-4439-93c1-70434bec96a0",  
 "assetKey": "dc3ea11e-a294-40db-b47d-d3891d850710",  
 "organizationId": "15a00ea3-6980-48ea-8e8c-651ddff1f0bf",  
 "displayName": "placekitten.jpeg",  
 "description": null,  
 "type": "image/jpeg",  
 "size": 6483,  
 "version": 0,  
 "expiration": 600000,  
 "visibility": "GLOBAL",  
 "state": "ACTIVE",  
 "scope": "APP",  
 "region": "us-west-2",  
 "createdTime": "2021-12-15T00:44:50.459Z",  
 "modifiedTime": "2021-12-15T00:44:52.076Z",  
 "deletedTime": null,  
 "validationErrors": null,  
 "extraInfo": null,  
 "downloadUrl": "https://assets.airkit.com/15a00ea3-6980-48ea-8e8c-651ddff1f0bf/dc3ea11e-a294-40db-b47d-d3891d850710/9d65de10-e1d5-4439-93c1-70434bec96a0/0",  
 "thumbnailUrl": "https://assets.airkit.com/15a00ea3-6980-48ea-8e8c-651ddff1f0bf/dc3ea11e-a294-40db-b47d-d3891d850710/9d65de10-e1d5-4439-93c1-70434bec96a0/0_t"  
}
```

The following example takes the Detailed Asset defined above and returns its size. Note that this matches the value of the **size** property given above:

```javascript
ASSET_SIZE(detailed_asset) -> 6483
```
