> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-typedoc-upgrade.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# weaveImage

> TypeScript SDK reference

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

Defined in: [src/media.ts:28](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/media.ts#L28)

Create a new WeaveImage object

## Parameters

### 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 });
```
