load

suspend fun load(url: String, targetSizePx: Int, maxBytes: Int = MaxDownloadBytes): Bitmap?

The image at url, sampled down to about targetSizePx, or null when it can't be loaded, such as when it is larger than maxBytes.

Parameters

url

The image's link.

targetSizePx

The size it shows at, in pixels: the image keeps both its sides at least this large, unless it would decode to more than MaxDecodedPixels.

maxBytes

The most bytes it downloads.