Skip to content

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.

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:

LimitValue
Maximum file size5 MB
Maximum dimensions4096 × 4096 px
Maximum animation frames100

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:

AdapterStored inServed at
CLI (local takuhon admin)an assets/ directory beside takuhon.jsonGET /assets/*
Cloudflarean R2 bucketGET /assets/* (long-lived cache)
Static exportuploads are not available

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.

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.