Extends TransformExtensionOptions

Properties

width

Image target width, defaults to undefined

width?: number

height

Image target height, defaults to undefined

height?: number

fit

How to fit image in target size bounds, defaults to 'contain'

fit?: "cover" | "contain" | "force"

upscale

Should we upscale images, defaults to false

upscale?: boolean

aspectRatio

Output aspect ratio, defaults to input image aspect ratio

aspectRatio?: number

type

Output format type, defaults to input image type, some example types are 'image/jpeg', 'image/webp', and 'image/png', limited to what the canvas toBlob method can output for the current browser

type?: string

quality

Resize quality. Defaults to 'medium'

quality?: "pixelated" | "low" | "medium" | "high"

compression

Compression quality. Value between 0 and 1, defaults to .98, only applies to JPEG and WEBP output

compression?: number

workersURL

Where the extension can find the WebWorker to use

workersURL?: URL

actionTransform

Action name to use for rename. Defaults to 'transformImage'

actionTransform?: string