Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fresh_images/mod.ts>handleImageRequest

Fresh plugin for manipulating images on-the-fly.
Latest
function handleImageRequest
import { handleImageRequest } from "https://deno.land/x/fresh_images@v0.3.0/mod.ts";

Handle an image transformation request.

Type Parameters

T extends string

Parameters

optional
transformers: ImagesPluginOptions["transformers"] = [UNSUPPORTED]

Available image transformations

req: Request

HTTP request

publicPath: T

Route exposed to the client

optional
localPath: string

Optional path to the local image directory. Defaults to root.

Returns

Promise<Response>

Response containing the transformed image or an error message