Remix Utils - v9.0.0
    Preparing search index...

    Function image

    • 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

      • content: undefined | null | BodyInit
      • __namedParameters: ResponseInit & { type: ImageType }

      Returns Response

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