This commit is contained in:
2023-04-08 17:21:40 +08:00
parent 68ea4e0810
commit 7910df8f18
2 changed files with 14 additions and 1 deletions

View File

@@ -2,6 +2,19 @@
提供webp生成服务
```javascript
// GET /webp/{type}-{id}-{version}-{width}-{height}-{fit}.{format}
// @type: image avatar article article_attribute ad
// @id: int 图片ID或是文章ID或是广告ID
// @version: update_time 时间戳
// @width: 宽度 1x 2x 3x 倍图直接输入尺寸
// @height: 高度 1x 2x 3x 倍图直接输入尺寸
// @fit: 裁切方式 cover contain fill auto
// GET /img/{type}-{id}.{format}?width=320&height=320&fit=cover
// 更优雅的实现, 使用查询参数的接口 (不幸的是CDN与OSS都不支持)
```
## Update