1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-13 23:45:30 -04:00
Files
jarv.is/components/media/Image.tsx

22 lines
485 B
TypeScript

import Image from "next/image";
import type { ImageProps } from "next/image";
const CustomImage = ({ src, width, height, alt, priority }: ImageProps) => {
return (
<div className="image_wrapper">
<Image
src={src}
layout="intrinsic"
width={width}
height={height}
alt={alt || ""}
quality={65}
loading={priority ? "eager" : "lazy"}
priority={!!priority}
/>
</div>
);
};
export default CustomImage;