多图源 纯计算路由 1 年 CDN 缓存 字节级去重 无需 API key
所有路由的 {id} 由你自己构造,相同 id 永远返回同一张图。需要随机时前端生成 id 即可,例如 crypto.randomUUID()。
https://oss.wggf.top/img/{id}/{w}/{h} — 自动从 Picsum / LoremFlickr 中按 hash 选源
| 路由 | 说明 |
|---|---|
/picsum/{id}/{w}/{h} | 用你自己的 id,会被 hash 映射到真实图 |
/picsum/raw/{picsumId}/{w}/{h} | 使用 Picsum 官方真实 id (0~1084) |
https://oss.wggf.top/flickr/{id}/{w}/{h}?tag=cat,dog — tag 可选
| 路由 | 说明 |
|---|---|
/avatar/{id} | 风格按 id hash 自动选 |
/avatar/{style}/{id} | 指定风格 |
可用风格: identicon · bottts · avataaars · lorelei · notionists · micah · personas · pixel-art · shapes · thumbs
// 文章封面(跟业务 id 绑定)
<img src="https://oss.wggf.top/img/post-12345/1200/600">
// 用户头像(跟用户名绑定)
<img src="https://oss.wggf.top/avatar/${username}">
// 真随机占位图(每次刷新不同)
const id = crypto.randomUUID();
img.src = `https://oss.wggf.top/img/${id}/800/600`;