For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /api/rspeedy.output.dataurilimit.md.
This is the dev preview website. Check out the document at lynxjs.org

Home > @lynx-js/rspeedy > Output > dataUriLimit

Output.dataUriLimit property

The Output.dataUriLimit option is used to set the size threshold to inline static assets such as images and fonts.

Signature:

dataUriLimit?: number | DataUriLimit | undefined;

Default Value

2048

Example 1

Inline all static assets less than 4kB:

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

Example 2

Disable inlining of static assets:

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

Example 3

Inline all static assets:

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

Example 4

Disable inlining of all media but not images.

lynx.config.ts
import { defineConfig } from '@lynx-js/rspeedy'

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