> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# weaveImage

> TypeScript SDK reference

# weaveImage

▸ **weaveImage**(`options`): [`WeaveImage`](../interfaces/weaveimage)

Create a new WeaveImage object

#### Parameters

| Name      | Type              | Description                                                                                                                                              |
| :-------- | :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `options` | `WeaveImageInput` | The options for this media type - data: The raw image data as a Buffer - imageType: (Optional) The type of image file, currently only 'png' is supported |

#### Returns

[`WeaveImage`](../interfaces/weaveimage)

`Example`

```ts theme={null}
const imageBuffer = fs.readFileSync('path/to/image.png');
const weaveImage = weaveImage({ data: imageBuffer });
```

#### Defined in

[media.ts:28](https://github.com/wandb/weave/blob/62f1e46098095776ee29b730ad10b3b3d1a68307/sdks/node/src/media.ts#L28)

***
