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
fromand
tois the switch:- both set →
local-assets: loose image files referenced in your
content are copied fromfromintotoand 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.
- both set →
- Delivery (how is it displayed?) —
cfImagewraps 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 },
},
},
}