mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix(web): profile image load (#2434)
This commit is contained in:
parent
4dff129949
commit
15fa8250cb
2 changed files with 41 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
|||
import { goto } from '$app/navigation';
|
||||
import { page } from '$app/stores';
|
||||
import { clickOutside } from '$lib/utils/click-outside';
|
||||
import { imageLoad } from '$lib/utils/image-load';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { fade, fly } from 'svelte/transition';
|
||||
import TrayArrowUp from 'svelte-material-icons/TrayArrowUp.svelte';
|
||||
|
|
@ -124,13 +125,13 @@
|
|||
>
|
||||
{#if user.profileImagePath}
|
||||
<img
|
||||
transition:fade={{ duration: 100 }}
|
||||
class:hidden={showProfilePictureFallback}
|
||||
src={`${$page.url.origin}/api/user/profile-image/${user.id}`}
|
||||
alt="profile-img"
|
||||
class="inline rounded-full h-12 w-12 object-cover shadow-md border-2 border-immich-primary hover:border-immich-dark-primary dark:hover:border-immich-primary dark:border-immich-dark-primary transition-all"
|
||||
draggable="false"
|
||||
on:load={() => (showProfilePictureFallback = false)}
|
||||
use:imageLoad
|
||||
on:image-load={() => (showProfilePictureFallback = false)}
|
||||
/>
|
||||
{/if}
|
||||
{#if showProfilePictureFallback}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue