Image
Thin wrapper around Next.js Image. Always provide width + height or use fill with a positioned parent.
import { Image } from "@/ui";
<Image src="/photo.jpg" alt="A photo" width={600} height={400} />
<div className="relative h-64 w-full">
<Image src="/hero.jpg" alt="Hero" fill sizes="100vw" />
</div>- Thin wrapper around Next.js Image. Refer to their docs for the full API.
- Always use
Imagefrom@/ui, never a raw<img> - Always pass
sizeswhen usingfill - Always provide meaningful
alttext (empty string only for decorative images)
import { Image } from "@/ui";
<Image src="/photo.jpg" alt="Description" width={400} height={300} />src/ui/Image.tsx
import NextImage, { type ImageProps } from "next/image";
export type { ImageProps };
export function Image(props: ImageProps) {
return <NextImage {...props} />;
}