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

View File

@@ -1,11 +1,16 @@
<script lang="ts">
import { WEBUI_BASE_URL } from '$lib/constants';
export let src = '/user.png';
</script>
<div class=" mr-3">
<img
crossorigin="anonymous"
{src}
src={src.startsWith(WEBUI_BASE_URL) ||
src.startsWith('https://www.gravatar.com/avatar/') ||
src.startsWith('data:')
? src
: `/user.png`}
class=" w-8 object-cover rounded-full"
alt="profile"
draggable="false"