Feat:支持上传前转换为webp格式

This commit is contained in:
MarSeventh
2026-01-07 22:40:53 +08:00
parent d9725d227c
commit 67c4355c13
26 changed files with 41 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@@ -132,6 +132,36 @@ export async function getPageConfig(db, env) {
placeholder: 'default',
category: '客户端设置',
},
{
id: 'defaultConvertToWebp',
label: '默认转换WebP',
type: 'boolean',
default: false,
tooltip: '上传前将图片转换为WebP格式可有效减小文件体积',
category: '客户端设置',
},
{
id: 'defaultCustomerCompress',
label: '默认开启压缩',
type: 'boolean',
default: true,
tooltip: '上传前在本地进行压缩,仅对图片文件生效',
category: '客户端设置',
},
{
id: 'defaultCompressBar',
label: '默认压缩阈值',
placeholder: '5',
tooltip: '图片大小超过此值将自动压缩单位MB范围1-20',
category: '客户端设置',
},
{
id: 'defaultCompressQuality',
label: '默认期望大小',
placeholder: '4',
tooltip: '压缩后图片大小期望值单位MB范围0.5-压缩阈值',
category: '客户端设置',
},
{
id: 'loginBkImg',
label: '登录页背景图',

View File

@@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/logo.png"><link rel="apple-touch-icon" href="/logo.png"><link rel="mask-icon" href="/logo.png" color="#f4b400"><meta name="description" content="Sanyue ImgHub - A modern file hosting platform"><meta name="keywords" content="Sanyue, ImgHub, file hosting, image hosting, cloud storage"><meta name="author" content="SanyueQi"><title>Sanyue ImgHub</title><script defer="defer" src="/js/chunk-vendors.780b6559.js"></script><script defer="defer" src="/js/app.1c8e2b69.js"></script><link href="/css/chunk-vendors.4363ed49.css" rel="stylesheet"><link href="/css/app.52df53e3.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but sanyue_imghub doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/logo.png"><link rel="apple-touch-icon" href="/logo.png"><link rel="mask-icon" href="/logo.png" color="#f4b400"><meta name="description" content="Sanyue ImgHub - A modern file hosting platform"><meta name="keywords" content="Sanyue, ImgHub, file hosting, image hosting, cloud storage"><meta name="author" content="SanyueQi"><title>Sanyue ImgHub</title><script defer="defer" src="/js/chunk-vendors.780b6559.js"></script><script defer="defer" src="/js/app.5c467426.js"></script><link href="/css/chunk-vendors.4363ed49.css" rel="stylesheet"><link href="/css/app.52df53e3.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but sanyue_imghub doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

BIN
js/531.a2525734.js.map.gz Normal file

Binary file not shown.

2
js/759.dd2d69c0.js Normal file

File diff suppressed because one or more lines are too long

BIN
js/759.dd2d69c0.js.gz Normal file

Binary file not shown.

1
js/759.dd2d69c0.js.map Normal file

File diff suppressed because one or more lines are too long

BIN
js/759.dd2d69c0.js.map.gz Normal file

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

2
js/app.5c467426.js Normal file

File diff suppressed because one or more lines are too long

BIN
js/app.5c467426.js.gz Normal file

Binary file not shown.

1
js/app.5c467426.js.map Normal file

File diff suppressed because one or more lines are too long

BIN
js/app.5c467426.js.map.gz Normal file

Binary file not shown.