.. index:: User, ProfileImage .. _profile_image: Profile image ============= Image used as the user's profile picture. There are two ways to set/update the profile image. One way is by issuing a POST against the profile-image resource with a post body that contains a URL. A placeholder image will be created for the uploaded image and the real image is downloaded in the background. An image will have its status attribute set to downloading until downloading completes. Clients interested in knowing when the image download has completed should poll the profile-image resource and wait until the status attribute changes. Another way to update the profile image is to issue a multipart/form-data POST against the profile-image resource with a post body that contains the image. See :ref:`image ` to find out which fields are returned when issuing a GET against this resource. Reference --------- .. endpoint:: GET /v1/users/{userId}/profile/profile-image Returns the profile. Returns statuscode 404 if no backdrop image is available. .. endpoint:: POST /v1/users/{userId}/profile/profile-image Set the profile image of a user profile. .. endpoint:: DELETE /v1/users/{userId}/profile/profile-image Remove the profile image. Errors ------ .. errors:: .. error:: :http: 400 :code: validation-failure Validation of the image failed There should be more information in the field errors Field errors ------------ .. fielderrors:: .. error:: :field: :code: field-missing :description: The value for this field is missing. .. error:: :field: file :code: file-too-large :description: The file supplied to this field exceeds the allowed size. .. error:: :field: file :code: invalid-file-format :description: The file supplied isn't one of the allowed file types (or is empty). Examples -------- .. include:: examples/get-profile-image-example.rst .. include:: examples/async-set-profile-image-example.rst .. include:: examples/delete-profile-image-example.rst .. include:: examples/multipart-set-profile-image-example.rst