Sets the profile image for a member. The request must be a multi-part request containing the original image and the coordinates to use to crop the image. PUT is also supported for this resource.
The coordinates should be specified in an aspect ratio of 3:4. For instance, if you have an image that is 800 X 800, and you want the center of the image selected for the profile image, you would pass in the following for the coordinates:
- Left: 100
- Top: 0
- Width: 600
- Bottom: 800
This will set the profile image to start 100 pixels from the left and go 600 pixels wide. 600 X 800 is in the 3:4 ratio.
You can specify 0 for all the coordinates and the API will create the biggest possible image from the original image. It would save the same image as above if all parameters were set to 0. It will center the rectangle horizontally if the original image is too wide and it will use the top of the original image if it is too long.
Body
Required
-
The left image coordinate of the cropping rectangle.
-
The top image coordinate of the cropping rectangle.
-
The width of the cropping rectangle.
-
The height of the cropping rectangle.
-
The original image file to use for the profile image. This is the image that will be cropped using the coordinates above.
curl \
--request POST 'https://api.globalwolfweb.com/wolfconnect/members/v1/{memberId}/profile-image' \
--header "Authorization: $API_KEY" \
--header "Content-Type: multipart/form-data" \
--form "left=42" \
--form "top=42" \
--form "width=42" \
--form "height=42" \
--form "profileImage=@file"
{
"Code": 42,
"Message": "string",
"Details": "string"
}
{
"Code": 42,
"Message": "string",
"Details": "string"
}