export type Props = { url: string; /** @description Optional mobile-optimized image. Served below 768px. */ mobileUrl?: string; alt?: string; caption?: string; size?: "full" | "normal"; /** @description Loads eagerly with high fetch priority. Use for above-the-fold images. */ highPriority?: boolean; }; export default function BlockImage({ url, mobileUrl, alt, caption, size, highPriority = false, }: Props) { const wrapperClass = size === "full" ? "my-8 -mx-[var(--gutter)]" : "my-8"; return (
{mobileUrl && } {alt
{caption && (
{caption}
)}
); }