2024-11-24 15:55:29 +01:00
|
|
|
<script lang="ts">
|
|
|
|
import { DEFAULT_AVATAR } from "$lib";
|
|
|
|
|
2024-11-24 17:36:02 +01:00
|
|
|
type Props = { url: string | null; alt: string; lazyLoad?: boolean; width?: number };
|
|
|
|
let { url, alt, lazyLoad, width }: Props = $props();
|
2024-11-24 15:55:29 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<img
|
|
|
|
class="rounded-circle img-fluid"
|
|
|
|
src={url || DEFAULT_AVATAR}
|
|
|
|
{alt}
|
2024-11-24 17:36:02 +01:00
|
|
|
width={width || 200}
|
2024-11-24 15:55:29 +01:00
|
|
|
loading={lazyLoad ? "lazy" : "eager"}
|
|
|
|
/>
|