[]previous and next page

ImageProcessor

Turns a source into the requested width, quality and format.

Turns a source into the requested width, quality and format. Returning undefined serves the source unchanged. A throw is reported and answered with a 500 that names no detail.

Import#

ts
import type { ImageProcessor } from "@shadow-js/dusk/server";

Signature#

ts
interface ImageProcessor {
  process(input: ImageProcessorInput): Promise<ImageSource | undefined>;
}

Members#

Name Type Description
process process(input: ImageProcessorInput): Promise<ImageSource | undefined>