Skip to content

Instantly share code, notes, and snippets.

@bre7
bre7 / Image.astro
Last active January 3, 2025 19:14 — forked from sannajammeh/Image.astro
Astro Responsive Image
---
import type { ImageMetadata, ImageTransform } from "astro";
import { getImage } from "astro:assets";
import LoadableImage from "./LoadableImage.astro";
type Props = {
src: ImageMetadata;
alt: string;
/**
* Array of screens to generate the image for i.e [320, 480, 1200]