Saves a newly uploaded profile picture.

If the optional crop_* and square_* parameters are not specified (all eight need to be specified for them to have an effect):

  • The entire photo will be used for the rectangular version
  • The square will be taken from the top of the rectangular version if it’s vertical, or from its center if it’s horizontal
This method requires the following permissions: photos.

Parameters

group_id
integer

If updating a group’s profile picture, identifier of that group.

id
string

A parameter returned by the upload endpoint.

hash
string

A parameter returned by the upload endpoint.

crop_x1
float (0..1)

X coordinate of the top left corner of the rectangular area displayed on the desktop website.

crop_y1
float (0..1)

Y coordinate of the top left corner of the rectangular area.

crop_x2
float (0..1)

X coordinate of the bottom right corner of the rectangular area.

crop_y2
float (0..1)

Y coordinate of the bottom right corner of the rectangular area.

square_x1
float (0..1)

X coordinate of the top left corner of the square area within the rectangular area (crop_*), used in most places where profile pictures are displayed.

square_y1
float (0..1)

Y coordinate of the top left corner of the square area.

square_x2
float (0..1)

X coordinate of the bottom right corner of the square area.

square_y2
float (0..1)

Y coordinate of the bottom right corner of the square area.

Result

Returns a photo object.

Errors

Global errors may occur when calling this method.