diff options
Diffstat (limited to 'src/components/elements/Image.js')
| -rw-r--r-- | src/components/elements/Image.js | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/components/elements/Image.js b/src/components/elements/Image.js index 1fedf61c..8981547a 100644 --- a/src/components/elements/Image.js +++ b/src/components/elements/Image.js @@ -1,18 +1,13 @@ -import NextImage from "next/image"; -import { LazyLoadComponent } from "react-lazy-load-image-component"; +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 ( - <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> + <LazyLoadImage + effect="opacity" + src={src || '/images/noimage.jpeg'} + alt={src ? alt : 'Image Not Found - Indoteknik'} + className={className} + /> ); }
\ No newline at end of file |
