Function scaleImage

  • Scales the image provided to the given width and height.

    Parameters

    • file: Blob

      A blob containing the image to scale.

    • width: number

      The width to scale the image to.

    • height: number

      The height to scale the image to.

    • format: Format = 'image/webp'

      The format of the scaled image.

    Returns Promise<string>

    A promise that resolves to a string containing the scaled image in a base64 representation.