> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-mintlify-9ec128a6.mintlify.site/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/6538626556c93d6f31ae725fdefe4e6b8b71bc2c/sdks/node/src/media.ts#L28)

***
