The link to get a person's avatar from directory is located at https://directory.unl.edu/avatar/{Person's UID}/. This link will redirect you to the corresponding image file for that person's avatar image, as a bonus this will automatically manage the cache versioning for when the person updates their avatar. If the user does not have a avatar image set it will return a JPEG version of the default image (This format for the default image is being limited due to our use of Gravatar).
From there there are many options that can be added as a URL query string. An example url with all the options is https://directory.unl.edu/avatar/{Person's UID}/?s=800&dpi=144&format=JPEG&cropped=true, however these options can be customized to fit your needs.
Option | URL Param | Default Value | Possible Values | Description |
---|---|---|---|---|
Size | s | 100 | topbar , tiny , small , medium , large , 800 , 400 , 240 , 200 , 120 , 100 , 72 , 48 , 40 , 24 , 16 | Size of the avatar image |
DPI | dpi | 72 | 144 , 72 | The resolution of the avatar image (DPI not dimension) |
Format | format | JPEG | JPEG , AVIF | The format of the avatar image |
Cropped | cropped | true | true , false | Whether we want to get the cropped image or the original |
- Printer-friendly version
- Log in to post comments