pngAvatar

fun User.pngAvatar(size: Int? = null): String(source)

Gets the url of the user's avatar in PNG format.

This is recommended as it can fall back on the default avatar if the user does not have a custom avatar.

Return

the url of the png formatted avatar or the url of the png formatted default avatar.

Parameters

size

the size of the image. Must be a power of two or null.

Throws

when the size is not null or a power of two.