diff --git a/src/lib/components/AvatarComponent.svelte b/src/lib/components/AvatarComponent.svelte index 980bc7b..04dd0b6 100644 --- a/src/lib/components/AvatarComponent.svelte +++ b/src/lib/components/AvatarComponent.svelte @@ -3,10 +3,12 @@ interface Props { account: Account; + lazyLoadImages: Boolean; } - let { account }: Props = $props(); + let { account, lazyLoadImages = true }: Props = $props(); let avatarDescription: string = $derived(`Avatar for ${account.acct}`); + let loadingProp = $derived(lazyLoadImages ? 'lazy' : 'eager'); let sourceSetHtml: string = $derived.by(() => { // Sort thumbnails by file type. This is important, because the order of the srcset entries matter. // We need the best format to be first @@ -41,7 +43,7 @@ {@html sourceSetHtml} - {avatarDescription} + {avatarDescription}