Limitations for image files:

  • Supported file formats are JPEG, GIF, PNG, WEBP, and HEIC/HEIF
  • Each of the dimensions must be no larger than 10 000 pixels
  • With default server configuration, the maximum file size is 10 MB
  • Alpha transparency is not supported. Images with a transparent background will be flattened to a white background
  • GIF animation is not supported. Animated GIFs will only show the first frame

Uploading images for wall posts, any comments, and private messages

  1. Call photos.getAttachmentUploadServer
  2. Upload the file by sending a POST request to the upload_url you received in the previous step. Use the multipart/form-data format and put the file into field named photo
  3. On success, the server will return a JSON object containing the id and hash fields
  4. Add these fields to your attachment JSON, see media attachments for details

Uploading user and group profile pictures

TODO

Uploading photos to albums

TODO