Set your profile picture
Your profile picture is the profile.avatar.url field. Takuhon gives you two
ways to fill it without hand-editing JSON: upload an image, or use
Gravatar. Both end at the same place — a URL in profile.avatar.url — so pick
whichever fits how you want to host the image.
Option 1 — Upload an image
Section titled “Option 1 — Upload an image”In the admin editor, the avatar field has an Upload image button. Pick a
file and it is validated, stripped of metadata, stored, and the resulting public
URL is written into profile.avatar.url.
Accepted formats are JPEG, PNG, WebP, and GIF. The type is detected from the
file’s bytes, not its name or Content-Type, so a mislabelled file is rejected.
Limits:
| Limit | Value |
|---|---|
| Maximum file size | 5 MB |
| Maximum dimensions | 4096 × 4096 px |
| Maximum animation frames | 100 |
Before storing, Takuhon strips embedded metadata — EXIF, IPTC, XMP, and colour profiles — so location tags and camera details never ship with your avatar. The pixel data is preserved unchanged.
Where the file lands depends on your adapter:
| Adapter | Stored in | Served at |
|---|---|---|
CLI (local takuhon admin) | an assets/ directory beside takuhon.json | GET /assets/* |
| Cloudflare | an R2 bucket | GET /assets/* (long-lived cache) |
| Static export | — | uploads are not available |
Option 2 — Use Gravatar
Section titled “Option 2 — Use Gravatar”If you already have a Gravatar, the admin editor can
turn an email address into an avatar URL. Choose Use Gravatar, enter your
email, and Takuhon writes the generated URL into profile.avatar.url.
Your email is never stored. It is hashed in the browser to build the URL and
the input is cleared — only the resulting https://gravatar.com/avatar/… URL is
saved.
The URL is built by the gravatarUrl helper in @takuhon/core, which hashes the
trimmed, lower-cased email with SHA-256. It also accepts an optional pixel
size and a default image (a Gravatar keyword such as identicon or
mp, the literal 404, or an image URL) for emails without a Gravatar.
Verify
Section titled “Verify”After either option, check that profile.avatar.url points where you expect —
an /assets/… URL for an upload, or a https://gravatar.com/avatar/… URL for
Gravatar — and that your profile page renders the new picture.
For the avatar field and its constraints, see the schema reference.