Image
To use content collections for alt texts, see generateImageEntries .
---
import Image from 'fulldev-ui/components/Image.astro'
---
<Image src="placeholder-landscape.webp" />
Props
| Prop | Type | Default |
|---|---|---|
| src | string | - |
| position | 'background' | 'cover' | 'inset' | - |
| id | CollectionEntry<'images'>['id'] | - |
| HTML Attributes | img | - |
Examples
---
import Image from 'fulldev-ui/components/Image.astro'
---
{/* image in public/images/ */}
<Image src="/images/placeholder-landscape.webp" />
{/* optimized image in public/images/ using astro:assets */}
<Image src="/images/placeholder-landscape.webp" width={600} height={400} />
{/* automatically optimized image in src/images/ using astro:assets */}
<Image src="placeholder-landscape.webp" />