refac: profile_image_url optimization
Some checks are pending
Deploy to HuggingFace Spaces / check-secret (push) Waiting to run
Deploy to HuggingFace Spaces / deploy (push) Blocked by required conditions
Create and publish Docker images with specific build args / build-main-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda126-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda126-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / build-slim-image (linux/amd64, ubuntu-latest) (push) Waiting to run
Create and publish Docker images with specific build args / build-slim-image (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda126-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-slim-images (push) Blocked by required conditions
Python CI / Format Backend (push) Waiting to run
Frontend Build / Format & Build Frontend (push) Waiting to run
Frontend Build / Frontend Unit Tests (push) Waiting to run

This commit is contained in:
Timothy Jaeryang Baek 2025-11-20 20:43:59 -05:00
parent cd30152c83
commit 6442871947
28 changed files with 56 additions and 97 deletions

View file

@ -1454,6 +1454,10 @@ async def get_models(
if "pipeline" in model and model["pipeline"].get("type", None) == "filter": if "pipeline" in model and model["pipeline"].get("type", None) == "filter":
continue continue
# Remove profile image URL to reduce payload size
if model.get("info", {}).get("meta", {}).get("profile_image_url"):
model["info"]["meta"].pop("profile_image_url", None)
try: try:
model_tags = [ model_tags = [
tag.get("name") tag.get("name")

View file

@ -253,6 +253,7 @@ async def get_model_profile_image(id: str, user=Depends(get_verified_user)):
) )
except Exception as e: except Exception as e:
pass pass
return FileResponse(f"{STATIC_DIR}/favicon.png") return FileResponse(f"{STATIC_DIR}/favicon.png")
else: else:
return FileResponse(f"{STATIC_DIR}/favicon.png") return FileResponse(f"{STATIC_DIR}/favicon.png")

View file

@ -10,7 +10,7 @@
import ChevronUp from '$lib/components/icons/ChevronUp.svelte'; import ChevronUp from '$lib/components/icons/ChevronUp.svelte';
import ChevronDown from '$lib/components/icons/ChevronDown.svelte'; import ChevronDown from '$lib/components/icons/ChevronDown.svelte';
import { WEBUI_BASE_URL } from '$lib/constants'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
const i18n = getContext('i18n'); const i18n = getContext('i18n');
@ -515,7 +515,7 @@
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<div class="shrink-0"> <div class="shrink-0">
<img <img
src={model?.info?.meta?.profile_image_url ?? `${WEBUI_BASE_URL}/favicon.png`} src={`${WEBUI_API_BASE_URL}/models/model/profile/image?id=${model.id}`}
alt={model.name} alt={model.name}
class="size-5 rounded-full object-cover shrink-0" class="size-5 rounded-full object-cover shrink-0"
/> />

View file

@ -5,6 +5,7 @@
import Cog6 from '$lib/components/icons/Cog6.svelte'; import Cog6 from '$lib/components/icons/Cog6.svelte';
import ArenaModelModal from './ArenaModelModal.svelte'; import ArenaModelModal from './ArenaModelModal.svelte';
import { WEBUI_API_BASE_URL } from '$lib/constants';
export let model; export let model;
let showModel = false; let showModel = false;
@ -27,7 +28,7 @@
<div class="flex flex-col flex-1"> <div class="flex flex-col flex-1">
<div class="flex gap-2.5 items-center"> <div class="flex gap-2.5 items-center">
<img <img
src={model.meta.profile_image_url} src={`${WEBUI_API_BASE_URL}/models/model/profile/image?id=${model.id}`}
alt={model.name} alt={model.name}
class="size-8 rounded-full object-cover shrink-0" class="size-8 rounded-full object-cover shrink-0"
/> />

View file

@ -37,7 +37,7 @@
import EllipsisHorizontal from '$lib/components/icons/EllipsisHorizontal.svelte'; import EllipsisHorizontal from '$lib/components/icons/EllipsisHorizontal.svelte';
import EyeSlash from '$lib/components/icons/EyeSlash.svelte'; import EyeSlash from '$lib/components/icons/EyeSlash.svelte';
import Eye from '$lib/components/icons/Eye.svelte'; import Eye from '$lib/components/icons/Eye.svelte';
import { WEBUI_BASE_URL } from '$lib/constants'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
let shiftKey = false; let shiftKey = false;
@ -334,7 +334,7 @@
: 'opacity-50 dark:opacity-50'} " : 'opacity-50 dark:opacity-50'} "
> >
<img <img
src={model?.meta?.profile_image_url ?? `${WEBUI_BASE_URL}/static/favicon.png`} src={`${WEBUI_API_BASE_URL}/models/model/profile/image?id=${model.id}`}
alt="modelfile profile" alt="modelfile profile"
class=" rounded-full w-full h-auto object-cover" class=" rounded-full w-full h-auto object-cover"
/> />

View file

@ -1,5 +1,5 @@
<script> <script>
import { WEBUI_BASE_URL } from '$lib/constants'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
import { WEBUI_NAME, config, user, showSidebar } from '$lib/stores'; import { WEBUI_NAME, config, user, showSidebar } from '$lib/stores';
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
import { onMount, getContext } from 'svelte'; import { onMount, getContext } from 'svelte';
@ -362,11 +362,7 @@
<div class="flex items-center"> <div class="flex items-center">
<img <img
class="rounded-full w-6 h-6 object-cover mr-2.5 flex-shrink-0" class="rounded-full w-6 h-6 object-cover mr-2.5 flex-shrink-0"
src={user?.profile_image_url?.startsWith(WEBUI_BASE_URL) || src={`${WEBUI_API_BASE_URL}/users/${user.id}/profile/image`}
user.profile_image_url.startsWith('https://www.gravatar.com/avatar/') ||
user.profile_image_url.startsWith('data:')
? user.profile_image_url
: `${WEBUI_BASE_URL}/user.png`}
alt="user" alt="user"
/> />

View file

@ -171,8 +171,7 @@
</div> </div>
{:else if item.type === 'model'} {:else if item.type === 'model'}
<img <img
src={item?.data?.info?.meta?.profile_image_url ?? src={`${WEBUI_API_BASE_URL}/models/model/profile/image?id=${item.id}&lang=${$i18n.language}`}
`${WEBUI_BASE_URL}/static/favicon.png`}
alt={item?.data?.name ?? item.id} alt={item?.data?.name ?? item.id}
class="rounded-full size-5 items-center mr-2" class="rounded-full size-5 items-center mr-2"
/> />

View file

@ -185,8 +185,7 @@
/> />
{:else} {:else}
<img <img
src={message.reply_to_message.user?.profile_image_url ?? src={`${WEBUI_API_BASE_URL}/users/${message.reply_to_message.user?.id}/profile/image`}
`${WEBUI_BASE_URL}/static/favicon.png`}
alt={message.reply_to_message.user?.name ?? $i18n.t('Unknown User')} alt={message.reply_to_message.user?.name ?? $i18n.t('Unknown User')}
class="size-4 ml-0.5 rounded-full object-cover" class="size-4 ml-0.5 rounded-full object-cover"
/> />
@ -220,7 +219,7 @@
{:else} {:else}
<ProfilePreview user={message.user}> <ProfilePreview user={message.user}>
<ProfileImage <ProfileImage
src={message.user?.profile_image_url ?? `${WEBUI_BASE_URL}/static/favicon.png`} src={`${WEBUI_API_BASE_URL}/users/${message.user.id}/profile/image`}
className={'size-8 ml-0.5'} className={'size-8 ml-0.5'}
/> />
</ProfilePreview> </ProfilePreview>

View file

@ -2,7 +2,7 @@
import { getContext, onMount } from 'svelte'; import { getContext, onMount } from 'svelte';
const i18n = getContext('i18n'); const i18n = getContext('i18n');
import { WEBUI_BASE_URL } from '$lib/constants'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
export let user = null; export let user = null;
</script> </script>
@ -11,8 +11,7 @@
<div class=" flex gap-3.5 w-full py-3 px-3 items-center"> <div class=" flex gap-3.5 w-full py-3 px-3 items-center">
<div class=" items-center flex shrink-0"> <div class=" items-center flex shrink-0">
<img <img
crossorigin="anonymous" src={`${WEBUI_API_BASE_URL}/users/${user?.id}/profile/image`}
src={user?.profile_image_url ?? `${WEBUI_BASE_URL}/static/favicon.png`}
class=" size-12 object-cover rounded-xl" class=" size-12 object-cover rounded-xl"
alt="profile" alt="profile"
/> />

View file

@ -11,6 +11,7 @@
import PencilSquare from '../icons/PencilSquare.svelte'; import PencilSquare from '../icons/PencilSquare.svelte';
import Tooltip from '../common/Tooltip.svelte'; import Tooltip from '../common/Tooltip.svelte';
import Sidebar from '../icons/Sidebar.svelte'; import Sidebar from '../icons/Sidebar.svelte';
import { WEBUI_API_BASE_URL } from '$lib/constants';
const i18n = getContext('i18n'); const i18n = getContext('i18n');
@ -80,7 +81,7 @@
> >
<div class=" self-center"> <div class=" self-center">
<img <img
src={$user?.profile_image_url} src={`${WEBUI_API_BASE_URL}/users/${$user?.id}/profile/image`}
class="size-6 object-cover rounded-full" class="size-6 object-cover rounded-full"
alt="User profile" alt="User profile"
draggable="false" draggable="false"

View file

@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import { WEBUI_BASE_URL } from '$lib/constants'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
import { marked } from 'marked'; import { marked } from 'marked';
import { config, user, models as _models, temporaryChatEnabled } from '$lib/stores'; import { config, user, models as _models, temporaryChatEnabled } from '$lib/stores';
@ -53,11 +53,7 @@
placement="right" placement="right"
> >
<img <img
crossorigin="anonymous" src={`${WEBUI_API_BASE_URL}/models/model/profile/image?id=${model.id}&lang=${$i18n.language}`}
src={model?.info?.meta?.profile_image_url ??
($i18n.language === 'dg-DG'
? `${WEBUI_BASE_URL}/doge.png`
: `${WEBUI_BASE_URL}/static/favicon.png`)}
class=" size-[2.7rem] rounded-full border-[1px] border-gray-100 dark:border-none" class=" size-[2.7rem] rounded-full border-[1px] border-gray-100 dark:border-none"
alt="logo" alt="logo"
draggable="false" draggable="false"

View file

@ -1069,14 +1069,9 @@
<div class="flex items-center justify-between w-full"> <div class="flex items-center justify-between w-full">
<div class="pl-[1px] flex items-center gap-2 text-sm dark:text-gray-500"> <div class="pl-[1px] flex items-center gap-2 text-sm dark:text-gray-500">
<img <img
crossorigin="anonymous"
alt="model profile" alt="model profile"
class="size-3.5 max-w-[28px] object-cover rounded-full" class="size-3.5 max-w-[28px] object-cover rounded-full"
src={$models.find((model) => model.id === atSelectedModel.id)?.info?.meta src={`${WEBUI_API_BASE_URL}/models/model/profile/image?id=${$models.find((model) => model.id === atSelectedModel.id).id}&lang=${$i18n.language}`}
?.profile_image_url ??
($i18n.language === 'dg-DG'
? `${WEBUI_BASE_URL}/doge.png`
: `${WEBUI_BASE_URL}/static/favicon.png`)}
/> />
<div class="translate-y-[0.5px]"> <div class="translate-y-[0.5px]">
<span class="">{atSelectedModel.name}</span> <span class="">{atSelectedModel.name}</span>

View file

@ -13,6 +13,7 @@
import Tooltip from '$lib/components/common/Tooltip.svelte'; import Tooltip from '$lib/components/common/Tooltip.svelte';
import VideoInputMenu from './CallOverlay/VideoInputMenu.svelte'; import VideoInputMenu from './CallOverlay/VideoInputMenu.svelte';
import { KokoroWorker } from '$lib/workers/KokoroWorker'; import { KokoroWorker } from '$lib/workers/KokoroWorker';
import { WEBUI_API_BASE_URL } from '$lib/constants';
const i18n = getContext('i18n'); const i18n = getContext('i18n');
@ -759,14 +760,8 @@
? ' size-16' ? ' size-16'
: rmsLevel * 100 > 1 : rmsLevel * 100 > 1
? 'size-14' ? 'size-14'
: 'size-12'} transition-all rounded-full {(model?.info?.meta : 'size-12'} transition-all rounded-full bg-cover bg-center bg-no-repeat"
?.profile_image_url ?? '/static/favicon.png') !== '/static/favicon.png' style={`background-image: url('${WEBUI_API_BASE_URL}/models/model/profile/image?id=${model?.id}&lang=${$i18n.language}&voice=true');`}
? ' bg-cover bg-center bg-no-repeat'
: 'bg-black dark:bg-white'} bg-black dark:bg-white"
style={(model?.info?.meta?.profile_image_url ?? '/static/favicon.png') !==
'/static/favicon.png'
? `background-image: url('${model?.info?.meta?.profile_image_url}');`
: ''}
/> />
{/if} {/if}
<!-- navbar --> <!-- navbar -->
@ -841,14 +836,8 @@
? 'size-48' ? 'size-48'
: rmsLevel * 100 > 1 : rmsLevel * 100 > 1
? 'size-44' ? 'size-44'
: 'size-40'} transition-all rounded-full {(model?.info?.meta : 'size-40'} transition-all rounded-full bg-cover bg-center bg-no-repeat"
?.profile_image_url ?? '/static/favicon.png') !== '/static/favicon.png' style={`background-image: url('${WEBUI_API_BASE_URL}/models/model/profile/image?id=${model?.id}&lang=${$i18n.language}&voice=true');`}
? ' bg-cover bg-center bg-no-repeat'
: 'bg-black dark:bg-white'} "
style={(model?.info?.meta?.profile_image_url ?? '/static/favicon.png') !==
'/static/favicon.png'
? `background-image: url('${model?.info?.meta?.profile_image_url}');`
: ''}
/> />
{/if} {/if}
</button> </button>

View file

@ -5,7 +5,7 @@
import { tick, getContext } from 'svelte'; import { tick, getContext } from 'svelte';
import { models } from '$lib/stores'; import { models } from '$lib/stores';
import { WEBUI_BASE_URL } from '$lib/constants'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
import Tooltip from '$lib/components/common/Tooltip.svelte'; import Tooltip from '$lib/components/common/Tooltip.svelte';
const i18n = getContext('i18n'); const i18n = getContext('i18n');
@ -83,7 +83,7 @@
> >
<div class="flex text-black dark:text-gray-100 line-clamp-1"> <div class="flex text-black dark:text-gray-100 line-clamp-1">
<img <img
src={model?.info?.meta?.profile_image_url ?? `${WEBUI_BASE_URL}/static/favicon.png`} src={`${WEBUI_API_BASE_URL}/models/model/profile/image?id=${model.id}&lang=${$i18n.language}`}
alt={model?.name ?? model.id} alt={model?.name ?? model.id}
class="rounded-full size-5 items-center mr-2" class="rounded-full size-5 items-center mr-2"
/> />

View file

@ -272,14 +272,6 @@
}} }}
> >
<div class="flex items-center gap-1.5"> <div class="flex items-center gap-1.5">
<!-- <ProfileImage
src={model?.info?.meta?.profile_image_url ??
($i18n.language === 'dg-DG'
? `${WEBUI_BASE_URL}/doge.png`
: `${WEBUI_BASE_URL}/favicon.png`)}
className={'size-5 assistant-message-profile-image'}
/> -->
<div class="-translate-y-[1px]"> <div class="-translate-y-[1px]">
{model ? `${model.name}` : history.messages[_messageId]?.model} {model ? `${model.name}` : history.messages[_messageId]?.model}
</div> </div>

View file

@ -6,7 +6,6 @@
</script> </script>
<img <img
crossorigin="anonymous"
aria-hidden="true" aria-hidden="true"
src={src === '' src={src === ''
? `${WEBUI_BASE_URL}/static/favicon.png` ? `${WEBUI_BASE_URL}/static/favicon.png`

View file

@ -36,7 +36,7 @@
removeDetails, removeDetails,
removeAllDetails removeAllDetails
} from '$lib/utils'; } from '$lib/utils';
import { WEBUI_BASE_URL } from '$lib/constants'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
import Name from './Name.svelte'; import Name from './Name.svelte';
import ProfileImage from './ProfileImage.svelte'; import ProfileImage from './ProfileImage.svelte';
@ -627,10 +627,7 @@
> >
<div class={`shrink-0 ltr:mr-3 rtl:ml-3 hidden @lg:flex mt-1 `}> <div class={`shrink-0 ltr:mr-3 rtl:ml-3 hidden @lg:flex mt-1 `}>
<ProfileImage <ProfileImage
src={model?.info?.meta?.profile_image_url ?? src={`${WEBUI_API_BASE_URL}/models/model/profile/image?id=${model.id}&lang=${$i18n.language}`}
($i18n.language === 'dg-DG'
? `${WEBUI_BASE_URL}/doge.png`
: `${WEBUI_BASE_URL}/favicon.png`)}
className={'size-8 assistant-message-profile-image'} className={'size-8 assistant-message-profile-image'}
/> />
</div> </div>

View file

@ -124,10 +124,7 @@
{#if !($settings?.chatBubble ?? true)} {#if !($settings?.chatBubble ?? true)}
<div class={`shrink-0 ltr:mr-3 rtl:ml-3 mt-1`}> <div class={`shrink-0 ltr:mr-3 rtl:ml-3 mt-1`}>
<ProfileImage <ProfileImage
src={message.user src={`${WEBUI_API_BASE_URL}/users/${user.id}/profile/image`}
? ($models.find((m) => m.id === message.user)?.info?.meta?.profile_image_url ??
`${WEBUI_BASE_URL}/user.png`)
: (user?.profile_image_url ?? `${WEBUI_BASE_URL}/user.png`)}
className={'size-8 user-message-profile-image'} className={'size-8 user-message-profile-image'}
/> />
</div> </div>

View file

@ -5,7 +5,7 @@
import dayjs from '$lib/dayjs'; import dayjs from '$lib/dayjs';
import { mobile, settings, user } from '$lib/stores'; import { mobile, settings, user } from '$lib/stores';
import { WEBUI_BASE_URL } from '$lib/constants'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
import Tooltip from '$lib/components/common/Tooltip.svelte'; import Tooltip from '$lib/components/common/Tooltip.svelte';
import { copyToClipboard, sanitizeResponseContent } from '$lib/utils'; import { copyToClipboard, sanitizeResponseContent } from '$lib/utils';
@ -77,8 +77,7 @@
<div class="flex items-center min-w-fit"> <div class="flex items-center min-w-fit">
<Tooltip content={$user?.role === 'admin' ? (item?.value ?? '') : ''} placement="top-start"> <Tooltip content={$user?.role === 'admin' ? (item?.value ?? '') : ''} placement="top-start">
<img <img
src={item.model?.info?.meta?.profile_image_url ?? src={`${WEBUI_API_BASE_URL}/models/model/profile/image?id=${item.model.id}&lang=${$i18n.language}`}
`${WEBUI_BASE_URL}/static/favicon.png`}
alt="Model" alt="Model"
class="rounded-full size-5 flex items-center" class="rounded-full size-5 flex items-center"
/> />

View file

@ -38,6 +38,7 @@
import ChatPlus from '../icons/ChatPlus.svelte'; import ChatPlus from '../icons/ChatPlus.svelte';
import ChatCheck from '../icons/ChatCheck.svelte'; import ChatCheck from '../icons/ChatCheck.svelte';
import Knobs from '../icons/Knobs.svelte'; import Knobs from '../icons/Knobs.svelte';
import { WEBUI_API_BASE_URL } from '$lib/constants';
const i18n = getContext('i18n'); const i18n = getContext('i18n');
@ -242,7 +243,7 @@
<div class=" self-center"> <div class=" self-center">
<span class="sr-only">{$i18n.t('User menu')}</span> <span class="sr-only">{$i18n.t('User menu')}</span>
<img <img
src={$user?.profile_image_url} src={`${WEBUI_API_BASE_URL}/users/${$user?.id}/profile/image`}
class="size-6 object-cover rounded-full" class="size-6 object-cover rounded-full"
alt="" alt=""
draggable="false" draggable="false"

View file

@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import { WEBUI_BASE_URL } from '$lib/constants'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
import { Handle, Position, type NodeProps } from '@xyflow/svelte'; import { Handle, Position, type NodeProps } from '@xyflow/svelte';
import ProfileImage from '../Messages/ProfileImage.svelte'; import ProfileImage from '../Messages/ProfileImage.svelte';
@ -21,7 +21,7 @@
{#if data.message.role === 'user'} {#if data.message.role === 'user'}
<div class="flex w-full"> <div class="flex w-full">
<ProfileImage <ProfileImage
src={data.user?.profile_image_url ?? `${WEBUI_BASE_URL}/user.png`} src={`${WEBUI_API_BASE_URL}/users/${data.user.id}/profile/image`}
className={'size-5 -translate-y-[1px]'} className={'size-5 -translate-y-[1px]'}
/> />
<div class="ml-2"> <div class="ml-2">
@ -41,7 +41,7 @@
{:else} {:else}
<div class="flex w-full"> <div class="flex w-full">
<ProfileImage <ProfileImage
src={data?.model?.info?.meta?.profile_image_url ?? ''} src={`${WEBUI_API_BASE_URL}/models/model/profile/image?id=${data.model.id}&lang=${$i18n.language}`}
className={'size-5 -translate-y-[1px]'} className={'size-5 -translate-y-[1px]'}
/> />

View file

@ -20,7 +20,7 @@
currentChatPage currentChatPage
} from '$lib/stores'; } from '$lib/stores';
import { sanitizeResponseContent, extractCurlyBraceWords } from '$lib/utils'; import { sanitizeResponseContent, extractCurlyBraceWords } from '$lib/utils';
import { WEBUI_BASE_URL } from '$lib/constants'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
import Suggestions from './Suggestions.svelte'; import Suggestions from './Suggestions.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte'; import Tooltip from '$lib/components/common/Tooltip.svelte';
@ -121,11 +121,7 @@
}} }}
> >
<img <img
crossorigin="anonymous" src={`${WEBUI_API_BASE_URL}/models/model/profile/image?id=${model?.id}&lang=${$i18n.language}`}
src={model?.info?.meta?.profile_image_url ??
($i18n.language === 'dg-DG'
? `${WEBUI_BASE_URL}/doge.png`
: `${WEBUI_BASE_URL}/static/favicon.png`)}
class=" size-9 @sm:size-10 rounded-full border-[1px] border-gray-100 dark:border-none" class=" size-9 @sm:size-10 rounded-full border-[1px] border-gray-100 dark:border-none"
aria-hidden="true" aria-hidden="true"
draggable="false" draggable="false"

View file

@ -41,7 +41,7 @@
importChat importChat
} from '$lib/apis/chats'; } from '$lib/apis/chats';
import { createNewFolder, getFolders, updateFolderParentIdById } from '$lib/apis/folders'; import { createNewFolder, getFolders, updateFolderParentIdById } from '$lib/apis/folders';
import { WEBUI_BASE_URL } from '$lib/constants'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
import ArchivedChatsModal from './ArchivedChatsModal.svelte'; import ArchivedChatsModal from './ArchivedChatsModal.svelte';
import UserMenu from './Sidebar/UserMenu.svelte'; import UserMenu from './Sidebar/UserMenu.svelte';
@ -559,7 +559,6 @@
> >
<div class=" self-center flex items-center justify-center size-9"> <div class=" self-center flex items-center justify-center size-9">
<img <img
crossorigin="anonymous"
src="{WEBUI_BASE_URL}/static/favicon.png" src="{WEBUI_BASE_URL}/static/favicon.png"
class="sidebar-new-chat-icon size-6 rounded-full group-hover:hidden" class="sidebar-new-chat-icon size-6 rounded-full group-hover:hidden"
alt="" alt=""
@ -694,7 +693,7 @@
> >
<div class=" self-center flex items-center justify-center size-9"> <div class=" self-center flex items-center justify-center size-9">
<img <img
src={$user?.profile_image_url} src={`${WEBUI_API_BASE_URL}/users/${$user?.id}/profile/image`}
class=" size-6 object-cover rounded-full" class=" size-6 object-cover rounded-full"
alt={$i18n.t('Open User Profile Menu')} alt={$i18n.t('Open User Profile Menu')}
aria-label={$i18n.t('Open User Profile Menu')} aria-label={$i18n.t('Open User Profile Menu')}
@ -1233,7 +1232,7 @@
> >
<div class=" self-center mr-3"> <div class=" self-center mr-3">
<img <img
src={$user?.profile_image_url} src={`${WEBUI_API_BASE_URL}/users/${$user?.id}/profile/image`}
class=" size-6 object-cover rounded-full" class=" size-6 object-cover rounded-full"
alt={$i18n.t('Open User Profile Menu')} alt={$i18n.t('Open User Profile Menu')}
aria-label={$i18n.t('Open User Profile Menu')} aria-label={$i18n.t('Open User Profile Menu')}

View file

@ -3,7 +3,7 @@
const i18n = getContext('i18n'); const i18n = getContext('i18n');
import { WEBUI_BASE_URL } from '$lib/constants'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
import Tooltip from '$lib/components/common/Tooltip.svelte'; import Tooltip from '$lib/components/common/Tooltip.svelte';
import PinSlash from '$lib/components/icons/PinSlash.svelte'; import PinSlash from '$lib/components/icons/PinSlash.svelte';
@ -36,8 +36,7 @@
> >
<div class="self-center shrink-0"> <div class="self-center shrink-0">
<img <img
crossorigin="anonymous" src={`${WEBUI_API_BASE_URL}/models/model/profile/image?id=${model.id}&lang=${$i18n.language}`}
src={model?.info?.meta?.profile_image_url ?? `${WEBUI_BASE_URL}/static/favicon.png`}
class=" size-5 rounded-full -translate-x-[0.5px]" class=" size-5 rounded-full -translate-x-[0.5px]"
alt="logo" alt="logo"
/> />

View file

@ -12,7 +12,7 @@
const i18n = getContext('i18n'); const i18n = getContext('i18n');
import { WEBUI_NAME, config, mobile, models as _models, settings, user } from '$lib/stores'; import { WEBUI_NAME, config, mobile, models as _models, settings, user } from '$lib/stores';
import { WEBUI_BASE_URL } from '$lib/constants'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
import { import {
createNewModel, createNewModel,
deleteModelById, deleteModelById,
@ -435,13 +435,12 @@
<div class="self-center pl-0.5"> <div class="self-center pl-0.5">
<div class="flex bg-white rounded-2xl"> <div class="flex bg-white rounded-2xl">
<div <div
class="{model.is_active ? '' : 'opacity-50 dark:opacity-50'} {model.meta class="{model.is_active
.profile_image_url !== `${WEBUI_BASE_URL}/static/favicon.png` ? ''
? 'bg-transparent' : 'opacity-50 dark:opacity-50'} bg-transparent rounded-2xl"
: 'bg-white'} rounded-2xl"
> >
<img <img
src={model?.meta?.profile_image_url ?? `${WEBUI_BASE_URL}/static/favicon.png`} src={`${WEBUI_API_BASE_URL}/models/model/profile/image?id=${model.id}&lang=${$i18n.language}`}
alt="modelfile profile" alt="modelfile profile"
class=" rounded-2xl size-12 object-cover" class=" rounded-2xl size-12 object-cover"
/> />

View file

@ -14,6 +14,7 @@
import Notes from '$lib/components/notes/Notes.svelte'; import Notes from '$lib/components/notes/Notes.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte'; import Tooltip from '$lib/components/common/Tooltip.svelte';
import Sidebar from '$lib/components/icons/Sidebar.svelte'; import Sidebar from '$lib/components/icons/Sidebar.svelte';
import { WEBUI_API_BASE_URL } from '$lib/constants';
let loaded = false; let loaded = false;
@ -95,7 +96,7 @@
> >
<div class=" self-center"> <div class=" self-center">
<img <img
src={$user?.profile_image_url} src={`${WEBUI_API_BASE_URL}/users/${$user?.id}/profile/image`}
class="size-6 object-cover rounded-full" class="size-6 object-cover rounded-full"
alt="User profile" alt="User profile"
draggable="false" draggable="false"

View file

@ -46,7 +46,7 @@
import { getAllTags, getChatList } from '$lib/apis/chats'; import { getAllTags, getChatList } from '$lib/apis/chats';
import { chatCompletion } from '$lib/apis/openai'; import { chatCompletion } from '$lib/apis/openai';
import { WEBUI_BASE_URL, WEBUI_HOSTNAME } from '$lib/constants'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL, WEBUI_HOSTNAME } from '$lib/constants';
import { bestMatchingLanguage } from '$lib/utils'; import { bestMatchingLanguage } from '$lib/utils';
import { setTextScale } from '$lib/utils/text-scale'; import { setTextScale } from '$lib/utils/text-scale';
@ -487,7 +487,7 @@
if ($settings?.notificationEnabled ?? false) { if ($settings?.notificationEnabled ?? false) {
new Notification(`${data?.user?.name} (#${event?.channel?.name}) • Open WebUI`, { new Notification(`${data?.user?.name} (#${event?.channel?.name}) • Open WebUI`, {
body: data?.content, body: data?.content,
icon: data?.user?.profile_image_url ?? `${WEBUI_BASE_URL}/static/favicon.png` icon: `${WEBUI_API_BASE_URL}/users/${data?.user?.id}/profile/image`
}); });
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 394 KiB