ContentImage

2 variants. Open one in isolation: use the link on each card.

WithCaption

Open alone →
Sample image
Caption with link

WithoutCaption

Open alone →
Sample image

src/ui/2_organisms/ContentImage.astro
---
import '../../styles/content-image.css'
interface Props {
src: string
alt: string
captionHtml?: string
}
const { src, alt, captionHtml } = Astro.props
---
<figure class="content-image-figure">
<img src={src} alt={alt} loading="lazy" decoding="async" />
{
captionHtml ? (
<figcaption class="content-image-caption meta text-sm" set:html={captionHtml} />
) : null
}
</figure>