This commit is contained in:
Timothy J. Baek
2024-05-17 10:56:16 -07:00
parent 014e52c072
commit 5b2369da5d
2 changed files with 12 additions and 3 deletions
+6 -2
View File
@@ -1,5 +1,5 @@
<script>
import { WEBUI_API_BASE_URL } from '$lib/constants';
import { WEBUI_BASE_URL } from '$lib/constants';
import { WEBUI_NAME, config, user, showSidebar } from '$lib/stores';
import { goto } from '$app/navigation';
import { onMount, getContext } from 'svelte';
@@ -264,7 +264,11 @@
<div class="flex flex-row w-max">
<img
class=" rounded-full w-6 h-6 object-cover mr-2.5"
src={user.profile_image_url}
src={user.profile_image_url.startsWith(WEBUI_BASE_URL) ||
user.profile_image_url.startsWith('https://www.gravatar.com/avatar/') ||
user.profile_image_url.startsWith('data:')
? user.profile_image_url
: `/user.png`}
alt="user"
/>