> ## 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 twoslash theme={null}
// @noErrors
const imageBuffer = fs.readFileSync('path/to/image.png');
const weaveImage = weaveImage({ data: imageBuffer });
```

#### Defined in

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

***
