Files
site-profile/src/components/ui/images/Image.astro
Alex Lebens 1dc4ccfbc6
Some checks failed
renovate / renovate (push) Has been cancelled
test-build / build (push) Has been cancelled
merge in new changes
2025-08-11 16:25:03 -05:00

18 lines
437 B
Plaintext

---
import { Image } from 'astro:assets';
import { ImageMetadata } from 'astro';
import { blurStyle } from '@support/image';
interface FsPathImage extends ImageMetadata {
fsPath?: string;
}
const props = Astro.props;
const image = props.src as FsPathImage;
const showBlur = !props.disableBlur;
const blurCSS = image.fsPath && showBlur ? await blurStyle(image.fsPath) : {};
---
<Image {...props} style={blurCSS} inferSize={true} />