User Avatars
User avatars are the profile images shown on account screens and community listings. The app stores them on the CDN and exposes one immutable URL per upload, which you can hotlink directly.
The URL
https://cdn.fnlb.net/user-avatars/{userId}/{avatarId}.webp{userId} is the FNLB account id and {avatarId} is the value in the user's avatar field. When avatar is empty, the user has no custom avatar and the URL does not exist.
Uploading an avatar
Avatars are uploaded from the Account screen in the FNLB app when the userAvatar feature flag is enabled. The app accepts PNG and JPEG files between 1 KB and 10 MB, with a maximum source size of 2048×2048, applies the image's EXIF orientation, then:
- Center-crops the image to a square.
- Resizes it to at most 256×256 without enlarging smaller images.
- Encodes it as WebP at quality 80.
The result is written back to the CDN under a new avatarId, and the user's previous avatars are removed.
Immutability and caching
Every upload produces a new avatarId, so the URL changes whenever the avatar changes. Treat user avatar URLs as immutable and cache them for as long as you like, with no ?v= query needed.
Example
const avatarUrl = avatarId
? `https://cdn.fnlb.net/user-avatars/${userId}/${avatarId}.webp`
: undefined;Next
- App icons
Uploaded icons for applications in the portal.
- CDN overview
What the CDN serves and how to cache it.