Files
portfolio/src/components/MDX/IMG.astro
Nathan Cummins 41079e93c1
All checks were successful
Build and Deploy to Web Server / deploy (push) Successful in 15m17s
Add alt as caption, add details to header, add some early writing to DNDT
2025-08-21 17:11:19 +09:30

18 lines
344 B
Plaintext

---
import Image from "astro/components/Image.astro";
const { src, alt } = Astro.props;
import { getImageByPath } from "@lib/utils";
const image = getImageByPath(src);
---
{
image && (
<div class="my-8">
<Image src={image} alt={alt} />
<div class="mt-2 block w-full text-center text-sm italic">{alt}</div>
</div>
)
}