# tools.image

Part of [Tools](https://kernstra.com/docs/web-sdk/config/tools) in the Kernstra Web SDK 1.0.0 configuration reference.

- Type: `boolean | ImageConfig`
- Default: `on, within the mode`
- Page: https://kernstra.com/docs/web-sdk/config/tools/image

Image insertion tool; it writes into the page itself. Needs the `annotations` license feature. Takes an `ImageConfig` object (or `true`, the same as `{}`). `types` narrows what the Image tool accepts — the picker's file filter, its fine print ("PNG or JPEG · up to 2 MB") and the check on a chosen or supplied file all follow it.

```ts
tools: { image: { maxBytes: 2 * 1024 * 1024, types: ['image/png', 'image/jpeg'] } }
```

### `image.maxBytes`

- Type: `number`
- Default: `10 MB`
- Page: https://kernstra.com/docs/web-sdk/config/tools/image-maxbytes

The largest file accepted, in bytes. Whatever its size, an image whose header claims over 64 million pixels, or a side over 16384 px, is refused before it is decoded. A value that is not a positive number keeps the default.

### `image.types`

- Type: `readonly string[]`
- Default: `PNG, JPEG, GIF, WebP, BMP`
- Page: https://kernstra.com/docs/web-sdk/config/tools/image-types

MIME types accepted. A type outside the default five (SVG, for one) is refused whatever the list says. Types match without regard to case; a list with nothing valid left keeps the default five.

Web page: https://kernstra.com/docs/web-sdk/config/tools/image
