Interface ImageOptions

ImageOptions Represents the options for image processing, including format-specific options, resizing, watermark, and more.

interface ImageOptions {
    maxWidth?: number;
    optimize?: boolean;
    resize?: boolean;
    squared?: boolean;
    suffix?: string;
    watermark?: boolean;
    watermarkPosition?: string;
}

Hierarchy

  • JpegOptions
  • PngOptions
  • WebpOptions
  • TiffOptions
  • GifOptions
  • JxlOptions
    • ImageOptions

Properties

maxWidth?: number

The maximum width for the resized image.

optimize?: boolean

Whether to optimize the image (e.g., reduce file size).

resize?: boolean

Whether to resize the image.

squared?: boolean

Whether to square the image (crop to a square aspect ratio).

suffix?: string

A suffix to add to the output filename.

watermark?: boolean

Whether to apply a watermark to the image.

watermarkPosition?: string

The position of the watermark on the image (e.g., 'center', 'top', 'bottom').