Bun

interface

Image.ResizeOptions

interface ResizeOptions

  • filter?: Filter

    Resampling kernel.

  • fit?: 'fill' | 'inside'

    "fill" stretches to exactly width×height. "inside" preserves aspect ratio so the result fits within width×height.

  • withoutEnlargement?: boolean

    Never upscale — if the source is already smaller, leave it.