aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Image.svelte
blob: 159a817fde903cfb0146189d1663dfec9d0674f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<script lang="ts">
  let { image, style, loading = undefined, width = undefined, height = undefined, fetchpriority = undefined }: {
    image: string;
    style?: string;
    loading?: "lazy" | "eager";
    width?: number;
    height?: number;
    fetchpriority?: "high" | "low" | "auto";
  } = $props();
</script>

<img
  src="/images/{image}.webp"
  alt={image}
  class={style}
  {loading}
  {width}
  {height}
  {fetchpriority}
/>