Files
jarv.is/components/media/Image.tsx
T
2022-01-16 18:31:51 -05:00

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;