Type Alias ImageData

ImageData: {
    name?: string;
    width: number;
    height: number;
    mtype?: string;
    id: string;
    keepApectRatio?: boolean;
}

Represents image data in Penpot. This includes properties for defining the image's dimensions, metadata, and aspect ratio handling.

Type declaration

  • Optionalname?: string

    The optional name of the image.

  • width: number

    The width of the image.

  • height: number

    The height of the image.

  • Optionalmtype?: string

    The optional media type of the image (e.g., 'image/png', 'image/jpeg').

  • id: string

    The unique identifier for the image.

  • OptionalkeepApectRatio?: boolean

    Whether to keep the aspect ratio of the image when resizing. Defaults to false if omitted.