• Create a response with a image file response. It receives a Buffer, ArrayBuffer or ReadableStream with the image content and set the Content-Type header to the type parameter.

    This is useful to dynamically create a image file from a Resource Route.

    Parameters

    Returns Response

    export async function loader({ request }: LoaderFunctionArgs) {
    return image(await takeScreenshot(), { type: "image/avif" });
    }