updateProfileImage

fun Account.updateProfileImage(    file: ByteArray,     mediaType: MediaType,     includeEntities: Boolean? = null,     skipStatus: Boolean? = null,     vararg options: Option): JsonObjectApiAction<User>

Updates the authenticating user's profile image. Note that this method expects raw multipart data, not a URL to an image.

This method asynchronously processes the uploaded file before updating the user's profile image URL. You can either update your local cache the next time you request the user's information, or, at least 5 seconds after uploading the image, ask for the updated URL using GET users/show.

Twitter API reference

Receiver

Account endpoint instance.

Return

JsonObjectApiAction for VerifyCredentials model.

Parameters

file

Required. The avatar image for the profile. Must be a valid GIF, JPG, or PNG image of less than 700 kilobytes in size. Images with width larger than 400 pixels will be scaled down. Animated GIFs will be converted to a static GIF of the first frame, removing the animation.

mediaType

Required. The type of file.

includeEntities

Optional. The entities node will not be included when set to false.

skipStatus

Optional. When set to either true, t or 1 statuses will not be included in the returned user object.

options

Optional. Custom parameters of this request.