diff --git a/react/components/LazyImages.tsx b/react/components/LazyImages.tsx index 10f40fef..fab8cc68 100644 --- a/react/components/LazyImages.tsx +++ b/react/components/LazyImages.tsx @@ -43,15 +43,17 @@ const useLazyImagesContext = () => { interface MaybeLazyImageProps { createElement: typeof React.createElement imageProps: Record + loadingType: string } const MaybeLazyImage: FC = ({ createElement = React.createElement, imageProps, + loadingType, }) => { const { lazyLoad, method } = useLazyImagesContext() - if (lazyLoad) { + if (lazyLoad && loadingType !== 'eager') { let newImageProps = imageProps switch (method) { diff --git a/react/core/main.tsx b/react/core/main.tsx index 99084903..a629e89d 100644 --- a/react/core/main.tsx +++ b/react/core/main.tsx @@ -347,6 +347,7 @@ function start() { { createElement: ReactCreateElement, imageProps: props, + loadingType: props.loading, }, ]) }