Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
kwh-progressive-image-loader
Advanced tools
**1.6KB** (Min + gzip) light Weight, OnPushed angular component to progressively load Image. Supports: - Animate Image Blur while switching URLS - Start loading On Custom Intersection and threshold - Custom Background Color Before loading
Readme
1.6KB (Min + gzip) light Weight, OnPushed angular component to progressively load Image. Supports:
To add the Progressive Loader to your Angular project:
npm install --save kwh-progressive-image-loader
Once installed, add the Progressive Loader to your app.module.ts
:
import { ProgressiveImageLoaderModule } from 'progressive-image-loader';
...
@NgModule({
...
imports: [
...
ProgressiveImageLoaderModule,
...
],
...
});
export class AppModule {}
Now you can use the Progressive loader component in your app components, for example in app.component.ts
:
import { ProgressiveImageLoaderOptions } from 'progressive-image-loader';
...
@Component({...})
export class AppComponent {
loadingOptions: ProgressiveImageLoaderOptions = {
thumbnailUrl: <thumbnail_url>,
originalUrl: <original_url>,
backgroundColor: <background_color>,
intersectionParent: <parent_to_observe_intersection>,
blurWhileBackground: <blur_while_background_color>,
blurWhileThumbnail: <blur_while_thumbnail_color>,
animationTimeBetweenBackgroundAndThumbnail: <animation_time_bw_bg_and_thumbnail>,
animationTimeBetweenThumbnailAndOriginal: <animation_time_bw_thumbnail_and_final_url>
};
}
And in template file app.component.html
:
<kwh-progressive-image-loader
[loadingOptions]="loadingOptions"
></kwh-progressive-image-loader>
Below is the list of properties for loadingOptions
ProgressiveImageLoaderOptions
Property | Optional | Default Value | dataType | description |
---|---|---|---|---|
thumbnailURL | false | - | string | thumbnail URL for the image to be loaded |
originalURL | false | - | string | Original URL for the image to be loaded |
backgroundColor | false | - | string | Background color before loading the thumbnail URL |
animationTimeBetweenBackgroundAndThumbnail | true | 300 (ms) | string | Time for which the blur should animate while applying thumbnail URL |
animationTimeBetweenThumbnailAndOriginal | true | 300 (ms) | string | Time for which the blur should animate while applying final (original) URL |
blurWhileBackground | true | 25 (px) | string | Blur value in pixels while background color is applied |
blurWhileThumbnail | true | 25 (px) | string | Blur value in pixels while thumbnail Image is applied |
intersectionParent | true | - | string | If intersection parent is provided, image will start loading once the image reaches the intersection threshold |
intersectionThreshold | true | 0.25 | string | fraction of image visible in the intersectionParent to trigger loading (between 0-1) |
Event | Description | OutputData |
---|---|---|
loadingFailed | When Image Loading Fails | ProgressStep |
In case of failed loading, possible values of ProgressStep
Value | Description |
---|---|
FINAL_LOADING_FAILED | When Original Image failed to load |
THUMBNAIL_LOADING_FAILED | When Thumbnail Image Failed to load |
Contact me at kishinkarra@gmail.com
FAQs
**1.6KB** (Min + gzip) light Weight, OnPushed angular component to progressively load Image. Supports: - Animate Image Blur while switching URLS - Start loading On Custom Intersection and threshold - Custom Background Color Before loading
We found that kwh-progressive-image-loader 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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.