2024-11-24 15:55:29 +01:00
|
|
|
<script lang="ts">
|
|
|
|
import { DEFAULT_AVATAR } from "$lib";
|
|
|
|
|
2024-11-24 22:19:53 +01:00
|
|
|
type Props = { url: string | null; alt: string; lazyLoad?: boolean };
|
|
|
|
let { url, alt, lazyLoad }: 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 22:19:53 +01:00
|
|
|
width={200}
|
2024-11-24 15:55:29 +01:00
|
|
|
loading={lazyLoad ? "lazy" : "eager"}
|
|
|
|
/>
|
2024-11-24 22:19:53 +01:00
|
|
|
|
|
|
|
<style>
|
|
|
|
img {
|
|
|
|
object-fit: cover;
|
|
|
|
height: 200px;
|
|
|
|
width: 200px;
|
|
|
|
}
|
|
|
|
</style>
|