import Image, { StaticImageData } from 'next/image'; import { ImageIcon } from 'lucide-react'; interface BlogImageProps { src: string | StaticImageData; alt: string; caption?: string; fullWidth?: boolean; } export const BlogImage = ({ src, alt, caption, fullWidth = false, }: BlogImageProps) => { const isStaticImage = typeof src !== 'string'; return (
{isStaticImage ? ( {alt} ) : (
{alt}
)}
{caption && (
{caption}
)}
); };