summaryrefslogtreecommitdiff
path: root/src/components/elements/Image.js
blob: 1fedf61cc733c8fda70f6953b4458f1561c3fda8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import NextImage from "next/image";
import { LazyLoadComponent } from "react-lazy-load-image-component";

export default function Image({ src, alt, className = "" }) {
  return (
    <LazyLoadComponent>
      <div className="w-full h-full flex justify-center items-center">
        <NextImage 
          src={src || '/images/noimage.jpeg'}
          alt={src ? alt : 'Image Not Found - Indoteknik'}
          width={1024}
          height={1024}
          className={className}
        />
      </div>
    </LazyLoadComponent>
  );
}