createResizedStreamCdnImageUrl

fun String.createResizedStreamCdnImageUrl(@FloatRange(from = 0.0, to = 1.0, fromInclusive = false) resizedWidthPercentage: Float, @FloatRange(from = 0.0, to = 1.0, fromInclusive = false) resizedHeightPercentage: Float, resizeMode: StreamCdnResizeImageMode? = null, cropMode: StreamCdnCropImageMode? = null): String

Generates a string URL with Stream CDN image resizing query parameters added to it. Once this URL is called, Stream's CDN will generate a resized image which is accessible using the link returned by this function.

Parameters

resizedWidthPercentage

The percentage of the original image width the resized image width will be.

resizedHeightPercentage

The percentage of the original image height the resized image height will be.

resizeMode

Sets the image resizing mode. The default mode is StreamCdnResizeImageMode.CLIP.

cropMode

Sets the image crop mode. The default mode is StreamCdnCropImageMode.CENTER.