mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 17:25:35 +03:00
feat: lazy load thumbnails on people and place list (#23682)
perf(web): lazy load thumbnails on people and place list
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
hiddenIconClass?: string;
|
||||
class?: ClassValue;
|
||||
brokenAssetClass?: ClassValue;
|
||||
preload?: boolean;
|
||||
onComplete?: ((errored: boolean) => void) | undefined;
|
||||
}
|
||||
|
||||
@@ -38,6 +39,7 @@
|
||||
onComplete = undefined,
|
||||
class: imageClass = '',
|
||||
brokenAssetClass = '',
|
||||
preload = true,
|
||||
}: Props = $props();
|
||||
|
||||
let loaded = $state(false);
|
||||
@@ -92,6 +94,7 @@
|
||||
{title}
|
||||
class={['object-cover', optionalClasses, imageClass]}
|
||||
draggable="false"
|
||||
loading={preload ? 'eager' : 'lazy'}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user