summaryrefslogtreecommitdiff
path: root/src/components/elements/Image.js
blob: 26e85bee4c8d2317dd06cc93a0c904b99d32466c (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={512}
          height={512}
          className={className}
        />
      </div>
    </LazyLoadComponent>
  );
}