diff --git a/server/routes/avatarproxy.ts b/server/routes/avatarproxy.ts index 2d72e2f19..5938fa945 100644 --- a/server/routes/avatarproxy.ts +++ b/server/routes/avatarproxy.ts @@ -54,9 +54,15 @@ router.get('/:jellyfinUserId', async (req, res) => { default: 'mm', size: 200, }); - const jellyfinAvatarUrl = `${getHostname()}/UserImage?UserId=${ - req.params.jellyfinUserId - }`; + + const setttings = getSettings(); + const jellyfinAvatarUrl = + setttings.main.mediaServerType === MediaServerType.JELLYFIN + ? `${getHostname()}/UserImage?UserId=${req.params.jellyfinUserId}` + : `${getHostname()}/Users/${ + req.params.jellyfinUserId + }/Images/Primary?quality=90`; + let imageData = await avatarImageCache.getImage( jellyfinAvatarUrl, fallbackUrl