
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
ng-lazy-images
Advanced tools
A very efficient image lazy loading tool based on user scroll. for blazing-fast page loading, with High-resolution images.
A very efficient image lazy loading tool based on user scroll. for blazing-fast page loading, with High-resolution images. and also SEO optimized.
Please note that this version is still under development Github repo
npm i ng-lazy-images
NgLazyImagesModule
in your app.module.tsimport { NgLazyImagesModule } from 'ng-lazy-images'
@NgModule({
declarations: [
AppComponent,
],
imports: [
BrowserModule,
NgLazyImagesModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
ng-lazy-images
inside your <img
ng-lazy-images -> Required
[lazySrc]="YOUR_HQ_IMG_URL" -> Required
[thumbSrc]="YOUR_THUMB_IMG_URL" -> Optional
[errorLazySrc]="FALLBACK_ALTERVATIVE_IMG_LINK" -> Optional
[debug]="false" -> Optional, Defualt is: false
[hasLoader]="true" -> Optional, Defualt is: false
[disableCaching]="false" -> Optional, Defualt is: false
/>
** Cation! don't use the regualr HTMl src
attribute, this will breake the package function, instead use the provided attributes in the previous example **
::ng-deep img[ng-lazy-images] {
&:not(.image-loaded, .thumb-loaded, .image-failed, .no-loader) {
background-color: #000;
animation-name: animation;
animation-duration: 1s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-play-state: running;
}
}
@-webkit-keyframes animation {
0% {
background-color: rgb(190, 190, 190);
}
50.0% {
background-color: #ddd;
}
100.0% {
background-color: rgb(190, 190, 190);
}
}
@keyframes animation {
0% {
background-color: rgb(190, 190, 190);
}
50.0% {
background-color: #ddd;
}
100.0% {
background-color: rgb(190, 190, 190);
}
}
FAQs
A very efficient image lazy loading tool based on user scroll. for blazing-fast page loading, with High-resolution images.
We found that ng-lazy-images demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.