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.
type
This is useful to dynamically create a image file from a Resource Route.
export async function loader({ request }: LoaderFunctionArgs) { return image(await takeScreenshot(), { type: "image/avif" });} Copy
export async function loader({ request }: LoaderFunctionArgs) { return image(await takeScreenshot(), { type: "image/avif" });}
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.