BannerImage
apps/www/src/components/BannerImage.astro · 23 lines · group Misc
Used by
No site uses it, neither now nor in the content repos’ history.
Samples 1

MDX of this sample
<BannerImage imageName="hero.jpg" />Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| imageName | string | yes | ||
| alt | string | '' | described only when it carries meaning; a decorative band stays silent |
Source apps/www/src/components/BannerImage.astro @ gitt.one
---
import { Image } from 'astro:assets';
import { resolveImage } from '../lib/images';
interface Props {
imageName: string;
/** described only when it carries meaning; a decorative band stays silent */
alt?: string;
}
const { imageName, alt = '' } = Astro.props;
const image = await resolveImage(imageName);
---
<Image
src={image}
alt={alt}
widths={[800, 1440, 1920]}
loading="eager"
fetchpriority="high"
class="h-32 w-full object-cover sm:h-40 lg:h-56"
/>Source links point to engine-astro@e857a859. Samples are cut from the sites' own content by scripts/gallery-extract.mjs; nothing is merged or removed yet.