Gathering detailed insights and metrics for image-viewer-dps
Gathering detailed insights and metrics for image-viewer-dps
Gathering detailed insights and metrics for image-viewer-dps
Gathering detailed insights and metrics for image-viewer-dps
Image Viewer For Angular 8+ . It also has various functionality like Image FullScreent, Rotate, Zoom etc.
npm install image-viewer-dps
Typescript
Module System
Node Version
NPM Version
TypeScript (70.42%)
HTML (10.12%)
CSS (9.74%)
JavaScript (9.71%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
11 Stars
11 Commits
55 Forks
2 Watchers
29 Branches
1 Contributors
Updated on Jun 09, 2025
Latest Version
4.0.0
Package Id
image-viewer-dps@4.0.0
Unpacked Size
269.39 kB
Size
49.97 kB
File Count
32
NPM Version
6.14.11
Node Version
14.16.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
A configurable Angular image viewer component, compatible with Angular 7.x+
To use default configuration, simply import the ImageViewerModule into your module, like so:
1import { AngularImageViewerModule } from "image-viewer-dps"; 2 3@NgModule({ 4 //... 5 imports: [ 6 //... 7 AngularImageViewerModule 8 ], 9 //... 10})
Then, add the component to your template, providing an array of image URLs. You can also optionally add an index, to indicate which image should be shown first. The default will be the first item in the array.
1<angular-image-viewer [src]="images" [(index)]="imageIndex"></angular-image-viewer>
By default, the image viewer will fill its container. If you wish to restrict the size, simply place it within a div, and set the size constraints on the div.
Configuration can be provided at the module level (by passing the object as an argument to forRoot()
, or at the component level, by passing it as the config
input. Any configuration provided at the component level will override that which is set at the module level.
The configuration object is structured as below. All values are optional, and if omitted, the default value shown below will be used.
1{ 2 btnClass: 'default', // The CSS class(es) that will apply to the buttons 3 zoomFactor: 0.1, // The amount that the scale will be increased by 4 containerBackgroundColor: '#ccc', // The color to use for the background. This can provided in hex, or rgb(a). 5 wheelZoom: true, // If true, the mouse wheel can be used to zoom in 6 allowFullscreen: true, // If true, the fullscreen button will be shown, allowing the user to enter fullscreen mode 7 allowKeyboardNavigation: true, // If true, the left / right arrow keys can be used for navigation 8 btnIcons: { // The icon classes that will apply to the buttons. By default, font-awesome is used. 9 zoomIn: 'fa fa-plus', 10 zoomOut: 'fa fa-minus', 11 rotateClockwise: 'fa fa-repeat', 12 rotateCounterClockwise: 'fa fa-undo', 13 next: 'fa fa-arrow-right', 14 prev: 'fa fa-arrow-left', 15 fullscreen: 'fa fa-arrows-alt', 16 }, 17 btnShow: { 18 zoomIn: true, 19 zoomOut: true, 20 rotateClockwise: true, 21 rotateCounterClockwise: true, 22 next: true, 23 prev: true 24 } 25};
To add additional buttons use the following
1<angular-image-viewer [src]="images" 2 [config]="{customBtns:[{name: 'link', icon: 'fa fa-paperclip'}]}" 3 (customImageEvent)="handleEvent($event)"> 4</angular-image-viewer>
1handleEvent(event: customImageEvent) { 2 console.log(`${event.name} has been click on img ${event.imageIndex + 1}`); 3 4 switch (event.name) { 5 case 'print': 6 break; 7 } 8}
Note: This package is built using the idea from ngx-image-viewer(https://github.com/jpilfold/ngx-image-viewer). It has advantage that it uses latest dependencies which fixes Issue #23 & #29 i.e related to FullScreen Image.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 0/11 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
138 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More