---
title: Image
description: Manages image data.
---

Manages image data.

Images objects contains image data. APIs in Scriptable that work with images, either by taking an image as input or returning an image, will use this the Image type.

## Properties

### size

Size of the image in pixels.

```typescript
size: Size
```

Read-only.

## Methods

<span id="fromdata" class="api-anchor"></span>

### fromData(data)

Creates an image from raw data.

```typescript
static fromData(data: Data): Image
```

Loads an image from the raw data. If the image could not be read, the function will return null.

#### Parameters

**`data` `Data`**

Data to read image from.

#### Return value

**`Image`**

The read image or null if the image could not be read.

<span id="fromfile" class="api-anchor"></span>

### fromFile(filePath)

Creates an image from file.

```typescript
static fromFile(filePath: string): Image
```

Loads an image from the specified file path. If the image could not be read, the function will return null.

#### Parameters

**`filePath` `string`**

File path to read image from.

#### Return value

**`Image`**

The read image or null if the image could not be read.