> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# output.dataUriLimit

> `optional` **dataUriLimit?**: `number` | `DataUriLimit`

:::info Lynx default override
This is an Rsbuild option whose default is overridden by `pluginLynx`. The default shown below applies when using the plugin. Set this option at the top level of `rsbuild.config.ts`; an explicit value takes precedence.

[See the Rsbuild reference for the full option behavior](https://rsbuild.rs/config/output/data-uri-limit).
:::

The [Output.dataUriLimit](/next/api/packages/rspeedy/interfaces/Output.md#dataurilimit) option is used to set the size threshold to inline static assets such as images and fonts.

## Default Value

```ts
2048
```

## Examples

Inline all static assets less than 4kB:

```js
import { defineConfig } from '@lynx-js/rspeedy'
export default defineConfig({
  output: {
    dataUriLimit: 4 * 1024,
  },
})
```

Disable inlining of static assets:

```js
import { defineConfig } from '@lynx-js/rspeedy'
export default defineConfig({
  output: {
    dataUriLimit: 0,
  },
})
```

Inline all static assets:

```js
import { defineConfig } from '@lynx-js/rspeedy'
export default defineConfig({
  output: {
    dataUriLimit: Number.MAX_SAFE_INTEGER,
  },
})
```

Disable inlining of all media but not images.

```ts title="lynx.config.ts"
import { defineConfig } from '@lynx-js/rspeedy'

export default defineConfig({
  output: {
    dataUriLimit: {
      image: 5000,
      media: 0,
    },
  },
})
```
