mirror of
https://github.com/revanced/revanced-website.git
synced 2025-04-29 14:14:30 +02:00
14 lines
390 B
Svelte
14 lines
390 B
Svelte
<script lang="ts">
|
|
// See: https://github.com/JonasKruckenberg/imagetools/blob/main/docs/directives.md#picture
|
|
import type { Picture } from 'vite-imagetools';
|
|
export let data: Picture;
|
|
export let alt: string;
|
|
</script>
|
|
|
|
<picture>
|
|
{#each Object.entries(data.sources) as [format, srcset]}
|
|
<source {srcset} type="image/{format}" />
|
|
{/each}
|
|
<img {alt} src={data.img.src} />
|
|
</picture>
|