Skip to content

Commit

Permalink
perf: update getThumbnail
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaviilee committed Nov 14, 2024
1 parent 724b22b commit 0312473
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ export function getThumbnail(url, size = 88, replace = true) {
url = url.replace(/oss\.jx3box\.com/g, "cdn.jx3box.com");
}

// gif不做处理
if (url.endsWith(".gif")) return url;

if (Array.isArray(size)) {
url += `?x-oss-process=image/auto-orient,1/resize,m_fill,w_${size[0]},h_${size[1]}/quality,Q_100`;
} else if (isNaN(size)) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jx3box/jx3box-common",
"version": "8.5.0",
"version": "8.5.1",
"description": "JX3BOX公共基础模块",
"main": "main.js",
"repository": {
Expand Down

0 comments on commit 0312473

Please sign in to comment.