https://image.thum.io/get/width/{width}/crop/800/{url}https://image.thum.io/get/width/600/crop/800/https://github.com输入任意网址,服务端渲染后返回 PNG 截图,不用装浏览器、不用配无头环境。
路径里的 width 是截图宽度,crop/800 是截取前 800 像素高;想要整页把 crop/800 换成 fullpage。
第一次请求某个网址要现场渲染,冷门站可能要 10 秒以上,同一个网址 1 小时内走缓存会很快。做友链展示、文章封面、网站导航缩略图都可以。
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
url |
string | 必填 | https://github.com | 要截图的网址,需带 http(s) |
width |
string | 选填 | 600 | 截图宽度像素 |
https://image.thum.io/get/width/{width}/crop/800/{url}
此处将显示接口返回结果…
(直接返回 PNG 图片)
—