astro-personal-website/src/components/Photo.astro
2023-10-18 22:43:38 -07:00

25 lines
415 B
Text

---
import { Image } from "astro:assets";
interface Props {
photo: any;
width?: number;
height?: number;
class?: string;
}
const { photo, width, height, class: className } = Astro.props;
---
<Image
src={photo}
alt=""
{width}
{height}
densities={[1, 2]}
quality="mid"
class={"object-contain rounded " + (className ?? "")}
decoding="sync"
loading="eager"
transition:name={photo.src}
/>