Thumbnail Service

Thumbnails of w3ds://file images at the pixel height or width you ask for.

Request

GET https://thumbnail-service.w3ds.dev/thumb?uri=<file URI>&h=<pixels>&w=<pixels>
ParameterMeaning
uriThe file's URI, w3ds://file?id=@<ename>/<meta-envelope-id>, URL-encoded. Required.
hHeight in pixels, 16 to 2048.
wWidth in pixels, 16 to 2048.

Give h, w, or both. The thumbnail fits inside that box, keeps its aspect ratio and is never larger than the original.

Response

A 302 redirect to the thumbnail, a WebP image. Use the request URL directly as an image source:

<img src="https://thumbnail-service.w3ds.dev/thumb?uri=w3ds%3A%2F%2Ffile%3Fid%3D%40alice%2Fabc123&h=200" alt="">

In JavaScript, encode the file URI yourself:

const src = "https://thumbnail-service.w3ds.dev/thumb?uri=" + encodeURIComponent(fileUri) + "&h=200";

The first request for a size makes the thumbnail, which can take a few seconds. After that the same size is served from storage.

Try it

Errors

Errors are JSON, { "error": "…" }.

StatusMeaning
400Missing or invalid uri, h or w.
404The owner's eVault has no such file.
413The original is larger than 25 MB.
415The file is not an image that can be resized.
502The Registry, an eVault or file storage could not be reached.

What it supports

How it works