diff --git a/src/components/LazyLoadImage.jsx b/src/components/LazyLoadImage.jsx index eb739a4..cc5af81 100644 --- a/src/components/LazyLoadImage.jsx +++ b/src/components/LazyLoadImage.jsx @@ -95,6 +95,11 @@ class LazyLoadImage extends React.Component { const { loaded } = this.state; const loadedClassName = loaded ? ' lazy-load-image-loaded' : ''; + const wrapperBackground = loaded || !placeholderSrc ? {} : + { + backgroundImage: `url(${placeholderSrc})`, + backgroundSize: '100% 100%' + } return (