You can only replace a photo if you are the profile owner or an administrator.
To replace the photo associated with a profile, complete the following steps:
1. Get the service document for the person's profile. See Retrieving the Profiles service document
2. From the service document, get the URI for the profiles feed which is specified in the href attribute of the collection element and use it to get the profiles feed for the user.
3. In the returned feed, find the link where the rel attribute has the value "http://www.ibm.com/xmlns/prod/sn/image" .../>. Alternatively, use the URI specified in the "Request Details" table below.
4. Use this link to send a PUT request to replace the image file.
Note: Be sure to make the new image file available to the application. For example, if you are writing a Java™ application, you might use a method that extends the EntityEnclosingMethod class to reference the file. Or, you might make the file available by adding it to a file system location that is HTTP addressable.
A binary image file in the format indicated by the Content-Type header in the payload of the request is required. A REST client that supports a binary stream of the media file you are trying to add is also required. No ATOM xml payload needed for this operation.