Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.
---
// @ts-ignore
import { getImage } from '../dist/index.js';
import { warnForMissingAlt } from './index.js';
import type { ImageComponentLocalImageProps, ImageComponentRemoteImageProps } from './index.js';
export type Props = ImageComponentLocalImageProps | ImageComponentRemoteImageProps;
const { loading = 'lazy', decoding = 'async', ...props } = Astro.props;
if (props.alt === undefined || props.alt === null) {
warnForMissingAlt();
}
const attrs = await getImage(props);
<img {...attrs} {loading} {decoding} />