mirror of
https://github.com/mikkelsvartveit/astro-personal-website.git
synced 2025-12-22 19:22:37 +00:00
25 lines
415 B
Text
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}
|
|
/>
|