Skip to content

v0.1.0-alpha.2

Pre-release
Pre-release

Choose a tag to compare

@diomalta diomalta released this 26 Jun 15:20
8be1573

Image source resolution. <img src> now resolves from the (previously inert) images and baseUrl render options.

  • images: a Record<string, Uint8Array> mapping an <img>'s src to raw bytes; the format (PNG/JPEG/GIF/WebP) is detected from the bytes.
  • baseUrl: normalizes a relative src into the images lookup key. No network or filesystem I/O on the render path — determinism is preserved.
  • Inline data: URLs continue to render.

BREAKING: a renderable <img> whose src cannot be resolved (missing images entry, remote/unknown-scheme URL, unsupported/malformed data: URL, or unrecognized bytes) now rejects with a located image:unresolved diagnostic instead of rendering blank. A src-less or empty src is skipped silently.

See #7.