mirror of
https://github.com/d0zingcat/BroadcastChannel.git
synced 2026-05-13 23:16:46 +00:00
feat: enhance channel favicon with dynamic resizing
Implements dynamic favicon handling using wsrv.nl image service: - Resizes channel avatar to 64x64 - Applies circular mask for consistent appearance - Ensures HTTPS compatibility by stripping protocol - Falls back to default favicon when no avatar exists Improves visual consistency across different platforms and scales
This commit is contained in:
@@ -37,7 +37,14 @@ const seoParams = {
|
||||
},
|
||||
},
|
||||
extend: {
|
||||
link: [{ rel: 'icon', href: channel?.avatar ? channel?.avatar : '/favicon.svg' }],
|
||||
link: [
|
||||
{
|
||||
rel: 'icon',
|
||||
href: channel?.avatar
|
||||
? `https://wsrv.nl/?w=64&h=64&fit=cover&mask=circle&url=ssl:${channel?.avatar?.replace(/^https?:\/\//, '')}`
|
||||
: '/favicon.svg',
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user