File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed
Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -212,22 +212,37 @@ ChatLab 定义了一套标准的聊天记录数据交换格式,用于支持多
212212
213213## 头像格式说明
214214
215- 头像字段 ` avatar ` 和 ` groupAvatar ` 使用 ** Data URL** 格式:
215+ 头像字段 ` avatar ` 和 ` groupAvatar ` 支持两种格式:
216+
217+ ### 1. Data URL
218+
219+ 嵌入式格式,图片数据直接编码在文件中,离线可用:
216220
217221```
218222data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...
219223```
220224
221- 支持的图片格式 :
225+ 支持的图片 MIME 类型 :
222226
223227- ` image/jpeg ` - JPEG 格式(推荐,体积较小)
224228- ` image/png ` - PNG 格式
225229- ` image/gif ` - GIF 格式
226230- ` image/webp ` - WebP 格式
227231
232+ ### 2. 网络 URL
233+
234+ 外链格式,图片存储在网络服务器,体积更小但需网络访问:
235+
236+ ```
237+ https://example.com/avatars/user123.jpg
238+ ```
239+
228240::: tip 建议
229- 导出时建议将头像压缩为 100×100 像素以内,以减小文件体积。
230- :::
241+
242+ - 如果需要离线使用或长期存档,推荐使用 Data URL 格式
243+ - 导出 Data URL 时建议将头像压缩为 100×100 像素以内,以减小文件体积
244+ - 如果头像来自可靠的长期有效的 CDN,可使用网络 URL 以减小文件体积
245+ :::
231246
232247## 完整示例
233248
Original file line number Diff line number Diff line change 11{
22 "name" : " ChatLab" ,
3- "version" : " 0.3.1 " ,
3+ "version" : " 0.4.0 " ,
44 "description" : " 本地聊天分析实验室" ,
55 "repository" : {
66 "type" : " git" ,
You can’t perform that action at this time.
0 commit comments