--- import { Image } from 'astro:assets'; import type { ImageMetadata } from 'astro'; import { resolveContent } from '../../lib/content'; interface Props { tag: string; src: ImageMetadata; alt: string; class?: string; loading?: 'lazy' | 'eager'; widths?: number[]; sizes?: string; height?: number; } const { tag, src, alt, class: cls, ...rest } = Astro.props; const c = resolveContent(tag); const override = c.type === 'image' && c.value ? `/uploads/${c.value}` : null; const guid = c.guid || undefined; --- {override ? {alt} : {alt}}