# Images

Every picture in the API is a PNG you can put straight into an `<img>` tag. Nothing needs a key.

## Avatars

```
https://api.alloymc.dev/v1/users/{handle}/avatar.png?s=128
```

An avatar is either the person's **sigil**, a pixel emblem drawn for their account in their profile colour, or the head of a Minecraft account they linked, whichever they picked.

- `s` is the size in pixels, from 8 to 512. Ask for about twice the size you show, for sharp results on high-density screens.
- The `avatarUrl` in API responses ends in `v=…`. That value changes whenever the avatar changes, so those exact URLs can be cached forever.

## Keep it crisp

Avatars are pixel art. Tell the browser not to smooth them:

```css
img.avatar {
  image-rendering: pixelated;
}
```

## Skin renders

```
https://api.alloymc.dev/v1/minecraft/{uuid}/head.png?s=64
https://api.alloymc.dev/v1/minecraft/{uuid}/body.png?s=128
```

For Minecraft accounts linked to AlloyMC. See [Minecraft accounts](https://api.alloymc.dev/docs/minecraft#heads-and-bodies).

## Caching

Images may be cached for an hour. If you store them yourself, refresh at most once an hour, and drop them when a profile is deleted.
