Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

TransformOptions

import type { TransformOptions } from "https://esm.sh/@supabase/storage-js@2.89.0/dist/index.d.mts";
interface TransformOptions {
format?: "origin";
height?: number;
quality?: number;
resize?: "cover" | "contain" | "fill";
width?: number;
}

§Properties

§
format?: "origin"
[src]

Specify the format of the image requested.

When using 'origin' we force the format to be the same as the original image. When this option is not passed in, images are optimized to modern image formats like Webp.

§
height?: number
[src]

The height of the image in pixels.

§
quality?: number
[src]

Set the quality of the returned image. A number from 20 to 100, with 100 being the highest quality. Defaults to 80

§
resize?: "cover" | "contain" | "fill"
[src]

The resize mode can be cover, contain or fill. Defaults to cover. Cover resizes the image to maintain it's aspect ratio while filling the entire width and height. Contain resizes the image to maintain it's aspect ratio while fitting the entire image within the width and height. Fill resizes the image to fill the entire width and height. If the object's aspect ratio does not match the width and height, the image will be stretched to fit.

§
width?: number
[src]

The width of the image in pixels.