Interface ImageContent

Content format of media events with msgtype m.image

interface ImageContent {
    body: string;
    file?: EncryptedFile;
    filename?: string;
    format?: "org.matrix.custom.html";
    formatted_body?: string;
    info?: ImageInfo;
    msgtype: Image;
    url?: string;
}

Hierarchy (view full)

Properties

body: string

If filename is not set or the value of both properties are identical, this is the filename of the original upload. Otherwise, this is a caption for the file.

Required if the file is encrypted. Information on the encrypted file, as specified in End-to-end encryption.

filename?: string

The original filename of the uploaded file.

format

The format used in the formatted_body.

formatted_body?: string

The formatted version of the body, when it acts as a caption. This is required if format is specified.

info?: ImageInfo

Metadata about the image referred to in url.

msgtype: Image

One of: [m.image].

url?: string

Required if the file is unencrypted. The URL (typically mxc:// URI) to the file.