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

# weaveImage

> TypeScript SDK reference

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

Create a new WeaveImage object

Defined in: [src/media.ts:31](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/media.ts#L31)

## Parameters

### options

The options for this media type

* data: The raw image data as a Buffer
* imageType: (Optional) The image format: 'png' (default), 'jpeg' or 'webp'.
  Publishing always names the stored file image.png

#### data

`Buffer`

#### imageType?

`"png"` | `"jpeg"` | `"webp"`

## Returns

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

## Example

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