Image

data class Image(val source: String) : MediaContent(source)

Represents image content that can be loaded from a local file or URL.

Constructors

Link copied to clipboard
constructor(source: String)

Properties

Link copied to clipboard
open override val format: String?

The file format/extension of the media content.

Link copied to clipboard

The path to local file or URL of the image.

Functions

Link copied to clipboard
open override fun getMimeType(): String

Gets the MIME type based on the image format.

Link copied to clipboard
fun isUrl(): Boolean

Checks if the image source is a URL.

Link copied to clipboard
open override fun toBase64(): String

Converts the media content to base64 encoded string.