Skip to content

Commit af38d08

Browse files
ashbrowningAljullu
authored andcommitted
feat(hideImage): hide background image when full image has loaded (#27)
1 parent 165a619 commit af38d08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/LazyLoadImage.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ class LazyLoadImage extends React.Component {
7171
className={wrapperClassName + ' lazy-load-image-background ' +
7272
effect + loadedClassName}
7373
style={{
74-
backgroundImage: 'url( ' + placeholderSrc + ')',
75-
backgroundSize: '100% 100%',
74+
backgroundImage: loaded ? '' : 'url( ' + placeholderSrc + ')',
75+
backgroundSize: loaded ? '' : '100% 100%',
7676
color: 'transparent',
7777
display: 'inline-block',
7878
height: height,

0 commit comments

Comments
 (0)