stnd.buildSTANDARD MANUAL2026-07-15

5.2 press.images — incomplete config

Why declaring only one of from/to throws, and how image resolution modes work.

press.images — Incomplete config

What

Press threw because your app’s config.press.images declares one of from
to but not the other:

press.images: "from" is set but "to" is missing.
Declare both (local-assets mode) or neither (passthrough).

from and to are a pair. Half of the pair is ambiguous, so Press fails the
build instead of silently guessing — a wrong guess means invisible images.

Why

Press handles images in two independent layers:

  • Resolution (where do the bytes live?) — the presence of from and
    to is the switch:
    • both set → local-assets: loose image files referenced in your
      content are copied from from into to and their <img> src is rewritten.
      For file-vault sites whose images are loose files on disk.
    • neither set → passthrough: the src is already a final URL
      (/cdn/… from R2, a remote URL). Press leaves it untouched. This is the
      default — edge / database apps need nothing here.
  • Delivery (how is it displayed?) — cfImage wraps the resolved URL for
    Cloudflare resizing. Independent of resolution.

There is no third “half-local” mode, so a lone from or to has no meaning.

How to fix

Local files — declare both, pointing at the source dir and the served path:

// modules/core/index.module.js
config: {
  press: {
    images: {
      from: "vault",            // dir to scan for referenced image files
      to: "/assets/vault",      // served base path they're copied to
      cfImage: { widths: [640, 960, 1280, 1920], quality: 85 },
    },
  },
}

Already-served URLs — declare neither (passthrough), keep only delivery:

config: {
  press: {
    images: {
      cfImage: { widths: [640, 960, 1280, 1920], quality: 85 },
    },
  },
}

See Also