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

const Image = ({ ...props }) => (
  <LazyLoadImage
    { ...props }
    src={props.src || '/images/noimage.jpeg'}
    placeholderSrc="/images/indoteknik-placeholder.png"
    alt={props.src ? props.alt : 'Image Not Found - Indoteknik'}
    wrapperClassName="bg-white"
  />
)

Image.defaultProps = LazyLoadImage.defaultProps

export default Image