Media
How media files are named, checked and cached.
Each media file is published under a name that contains the hash of its content:
https://media.owlclient.dev/servers/<id>/<kind>.<hash16>.<ext>For example, servers/example-server/icon.9a074acc50d03841.png. The first 16 hexadecimal characters of the file's sha256 are in the name, and the full hash is in the catalog.
Kinds
| Kind | Format published | Size published |
|---|---|---|
icon | PNG | 64×64 |
logo | PNG | 512×512 |
background | WebP | 1920×1080 |
banner | WebP | 1200×300 |
The rules for the source images are in media specifications.
Verifying a download
A downloaded file is correct when all of these hold:
- its byte length equals
bytesin the catalog; - its sha256 equals
sha256in the catalog; - its content type is the one in
contentType.
Use the hash, not the name, to decide whether a cached copy can be reused. A cached file with the same sha256 is always safe to use.
Why the name changes
A new image is a new file with a new name. This is why media can be cached for a year without ever showing an outdated image: the old URL still returns the old image, and the catalog points to the new URL. Clients never need to ask whether a file changed.
Metadata removal
Every published image has been re-encoded, so it contains no embedded metadata. Do not expect EXIF or other data to survive.
Missing media
If a server has no entry for a kind, there is no custom image for that kind. Use your own default. If an entry exists but the download fails, use a cached copy with the same hash, or your local fallback.