Preview
Endpoints
| GET /random | Public. Streams image bytes; usable directly as an <img src>. |
| GET /random?type=redirect | Public. 302 to the image, which the edge caches. |
| GET /random?type=json | Public. Returns {name, url, width, height, bytes}. |
| GET /i/{name} | Public. Content-addressed and immutably cacheable. |
| POST /upload | Authenticated. Multipart field files holding WebP images; scripts may send an X-Upload-Token header. |
| POST /reload | Authenticated. Reconciles the index with the R2 bucket. |
| GET /stats · /list | Public. /stats adds storage and session details only when authenticated. |
The password is the Worker secret ADMIN_PASSWORD; change it with wrangler secret put ADMIN_PASSWORD.