Skip to content

armgit / kiln

Public Imported from GitHub
0

Build and revise procedural 3D assets with your coding agent. Local MCP server, CLI and TypeScript engine with rendered review, editable source and GLB export.

722 B
Raw Blame
---
import type { CatalogImage } from "../lib/catalog";
interface Props {
  image: CatalogImage;
  sizes?: string;
  eager?: boolean;
  class?: string;
}
const {
  image,
  sizes = "(max-width: 768px) 100vw, 50vw",
  eager = false,
  class: className = "w-full",
} = Astro.props;
---

<picture>
  {image.srcsetAvif && <source type="image/avif" srcset={image.srcsetAvif} sizes={sizes} />}
  <img
    src={image.src}
    srcset={image.srcsetWebp || undefined}
    sizes={image.srcsetWebp ? sizes : undefined}
    width={image.width}
    height={image.height}
    alt={image.alt}
    loading={eager ? "eager" : "lazy"}
    decoding="async"
    fetchpriority={eager ? "high" : undefined}
    class={className}
  />
</picture>