summaryrefslogtreecommitdiff
path: root/src/components/elements/Image.js
blob: e85237ed58ccb4d2a8a90d6a5476510fa4e787e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { LazyLoadImage } from "react-lazy-load-image-component";
import 'react-lazy-load-image-component/src/effects/opacity.css';

export default function Image({ src, alt, className = "" }) {
  return (
    <LazyLoadImage 
      effect="opacity"
      src={src || '/images/noimage.jpeg'}
      alt={src ? alt : 'Image Not Found - Indoteknik'}
      className={className}
    />
  );
}