🚸 处理图片以加快加载速度

This commit is contained in:
目棃
2025-01-09 09:41:11 +08:00
parent 6744c875b6
commit b7f9d083e7
3 changed files with 25 additions and 6 deletions

View File

@@ -142,7 +142,8 @@ function getPostCover(item: TGApp.Plugins.Mys.Post.FullData): string {
else if (item.post.images.length > 0) cover = item.post.images[0];
if (cover === undefined) return "";
if (cover.endsWith(".gif")) return cover;
return `${cover}?x-oss-process=image/format,png`;
// 裁剪图片格式为 png比例为 36:13进行缩放但是不拉伸
return `${cover}?x-oss-process=image/resize,m_fill,w_360,h_130,limit_0/format,png`;
}
/**