users.setPhoto
method
We're still building and not all features are available quite yet. Enjoy this peek into the future!
Not ready for the future? Return to the past at api.slack.com.
Usage info
This method allows the user to set their profile image. The caller can pass image data via image
.
Providing a "crop box" with crop_x
, crop_y
, and crop_w
is optional. Otherwise, the whole image will be used. If cropping instructions are not specified and the source image is not square, the image will be letterboxed, just like your favorite old laserdiscs.
Please limit your images to a maximum size of 1024 by 1024 pixels. 512x512 pixels is the minimum.
To remove a profile image, use the companion method users.deletePhoto
.
Use this method with a HTTP POST and provide your HTTP Content-type
as multipart/form-data
.
When providing the image
parameter, provide your image data directly but present its correct Content-type
, such as image/gif
, image/jpeg
, image/png
, etc.