Skip to content

Commit fdb7417

Browse files
authored
fix lazyload in chrome
1 parent ee7c91b commit fdb7417

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cloudinary-image.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { isBrowser } from './cloudinary.service';
2020

2121
@Component({
2222
selector: 'cl-image',
23-
template: `<img [style.display]="shouldShowPlaceHolder ? 'none' : 'inline'" (load)="hasLoaded()">
23+
template: `<img [ngStyle]="{opacity: shouldShowPlaceHolder ? '0' : '1', position: shouldShowPlaceHolder ? 'absolute' : 'unset'}"(load)="hasLoaded()">
2424
<div [style.display]="shouldShowPlaceHolder ? 'inline' : 'none'">
2525
<ng-content></ng-content>
2626
</div>

0 commit comments

Comments
 (0)