ContentMedia

data class ContentMedia(val assetId: String?, val publicHash: String?, val width: Int?, val height: Int?, val contentType: String?, imageBaseUrl: String?)

An image attached to a content item, served publicly (no auth header) by the image server of the SDK's environment.

Constructors

Link copied to clipboard
constructor(assetId: String?, publicHash: String?, width: Int?, height: Int?, contentType: String?, imageBaseUrl: String?)

Properties

Link copied to clipboard

The asset's id in the content library.

Link copied to clipboard

MIME type of the original upload, e.g. image/png.

Link copied to clipboard
val height: Int?

Height of the original upload in pixels, or null.

Link copied to clipboard

The content hash the image server addresses the asset by, or null when the server did not publish one - then url is null too.

Link copied to clipboard
val width: Int?

Width of the original upload in pixels, or null.

Functions

Link copied to clipboard
fun url(rendition: ContentImageRendition): String?

The URL of this image at rendition, or null when the asset has no public hash or the SDK has no image server configured.