feat: 增加自定义头像上传、自动压缩与自动清理功能,统一全站头像路径读取逻辑
This commit is contained in:
@@ -415,7 +415,8 @@
|
||||
|
||||
const avatar = document.createElement('img');
|
||||
avatar.className = 'fp-avatar';
|
||||
avatar.src = '/images/headface/' + (f.headface || '1.gif');
|
||||
let hf = f.headface || '1.gif';
|
||||
avatar.src = hf.startsWith('storage/') ? '/' + hf : '/images/headface/' + hf;
|
||||
avatar.alt = f.username;
|
||||
|
||||
const name = document.createElement('span');
|
||||
@@ -456,7 +457,8 @@
|
||||
|
||||
const avatar = document.createElement('img');
|
||||
avatar.className = 'fp-avatar';
|
||||
avatar.src = '/images/headface/' + (p.headface || '1.gif');
|
||||
let hf = p.headface || '1.gif';
|
||||
avatar.src = hf.startsWith('storage/') ? '/' + hf : '/images/headface/' + hf;
|
||||
avatar.alt = p.username;
|
||||
|
||||
const name = document.createElement('span');
|
||||
|
||||
Reference in New Issue
Block a user