Avatar Type

Employee App
Staffbase Intranet

The avatar image will be displayed in different occasions of the App (Profile, Comments, Staffbase Studio etc.). Therefore the avatar is used in three appropriate sizes (Original, Thumbnail or Icon). For each of these sizes, the data model is the following:

name type description example
url string The URL to the avatar image. https://example.com
.../path/{userId}.jpeg
width optional integer The width of this image (px). 512
height optional integer The height of this image (px). 512
size optional integer The file size of this image in bytes. 29942
format optional string The file format related to the mime type. png
mimeType optional string The URL to this avatar image. image/png
created optional string The date indicating when this image was uploaded. Only on the original avatar. 2021-09-09T10:17:40.000Z

In the future there may be more supported formats, as of the writing of this article the avatar supports to the following formats:

  • JPG
  • PNG
  • GIF
  • TIF
  • BMP
  • HEIC (iOS high efficiency format)

Learn more about supported media formats.

"avatar": {
"original": {
"url": "https://{{sb-host}}.com/{{sb-system}}/image/upload/v1631172776/{{shortened}}/5fb67f2ddd7c407fbdd11524.png",
"width": 225,
"height": 225,
"size": 4650,
"format": "png",
"mimeType": "image/png",
"created": "2021-09-09T07:32:56.000Z"
},
"icon": {
"url": "https://{{sb-host}}.com/{{sb-system}}/image/upload/{{transformationInfo}}/v1631172776/{{shortened}}/5fb67f2ddd7c407fbdd11524.png",
"format": null,
"mimeType": null
},
"thumb": {
"url": "https://{{sb-host}}.com/{{sb-system}}/image/upload/{{transformationInfo}}/v1631172776/{{shortened}}/5fb67f2ddd7c407fbdd11524.png",
"format": null,
"mimeType": null
}
}