Skip to content

Type Alias: ImageResolver

ts
type ImageResolver = (src: string) => 
  | {
  bytes: Uint8Array;
  mime?: string;
}
  | Uint8Array
  | null;

Defined in: gvc/image-resolver.ts:28

Caller-supplied image resolver: given a node's image=/HTML <IMG SRC=> value, return the raw bytes (optionally with an explicit MIME type), or null when the source cannot be resolved.

Parameters

src

string

Returns

| { bytes: Uint8Array; mime?: string; } | Uint8Array | null