import { LazyLoadImage } from "react-lazy-load-image-component"
import "react-lazy-load-image-component/src/effects/opacity.css"

const Image = ({ ...props }) => (
  <LazyLoadImage
    { ...props }
    effect="opacity"
    src={props.src || '/images/noimage.jpeg'}
    alt={props.src ? props.alt : 'Image Not Found - Indoteknik'}
  />
)

Image.defaultProps = LazyLoadImage.defaultProps

export default Image