Gathering detailed insights and metrics for react-images
Gathering detailed insights and metrics for react-images
Gathering detailed insights and metrics for react-images
Gathering detailed insights and metrics for react-images
react-images-viewer
Create an react-images-viewer component.
react-image
React Image is an <img> tag replacement for react, featuring preloader and multiple image fallback support
@haz3l/react-images-viewer
Create an react-images-viewer component.
react-easy-crop
A React component to crop images/videos with easy interactions
🌄 A mobile-friendly, highly customizable, carousel component for displaying media in ReactJS
npm install react-images
Typescript
Module System
1.2.0-beta.7 - Fixes fullscreen mode
Updated on Apr 29, 2021
1.2.0-beta.3
Updated on Feb 13, 2021
1.2.0-beta.2
Updated on Feb 13, 2021
v1.2.0-beta.1 - Maintenance release
Updated on Feb 09, 2021
v1.1.2 - Accessibility!
Updated on Apr 10, 2020
v1.1.0
Updated on Mar 24, 2020
JavaScript (99.85%)
Shell (0.15%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
2,343 Stars
601 Commits
439 Forks
40 Watchers
12 Branches
59 Contributors
Updated on Jun 20, 2025
Latest Version
1.2.0-beta.7
Package Id
react-images@1.2.0-beta.7
Size
56.35 kB
Published on
Apr 29, 2021
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
9
3
40
Don't use this in a new project. This package hasn't been properly maintained in a long time and there are much better options available.
Instead, try...
A mobile-friendly, highly customizable, carousel component for displaying media in ReactJS.
Should work in every major browser... maybe even IE10 and IE11?
Start by installing react-images
1npm install react-images
or
1yarn add react-images
If you were using 0.x
versions: library was significantly rewritten for 1.x
version and contains several breaking changes.
The best way to upgrade is to read the docs and follow the examples.
Please note that the default footer parses HTML automatically (such as <b>I'm bold!</b>
) but it does not implement any form of XSS or sanitisation. You should do that yourself before passing it into the caption field of react-images.
Import the carousel from react-images
at the top of a
component and then use it in the render function.
1import React from 'react' 2import Carousel from 'react-images' 3 4const images = [{ source: 'path/to/image-1.jpg' }, { source: 'path/to/image-2.jpg' }] 5 6class Component extends React.Component { 7 render() { 8 return <Carousel views={images} /> 9 } 10}
Import the modal and optionally the modal gateway from
react-images
at the top of a component and then use it in
the render function.
The ModalGateway
will insert the modal just before the
end of your <body />
tag.
1import React from 'react' 2import Carousel, { Modal, ModalGateway } from 'react-images' 3 4const images = [{ source: 'path/to/image-1.jpg' }, { source: 'path/to/image-2.jpg' }] 5 6class Component extends React.Component { 7 state = { modalIsOpen: false } 8 toggleModal = () => { 9 this.setState(state => ({ modalIsOpen: !state.modalIsOpen })) 10 } 11 render() { 12 const { modalIsOpen } = this.state 13 14 return ( 15 <ModalGateway> 16 {modalIsOpen ? ( 17 <Modal onClose={this.toggleModal}> 18 <Carousel views={images} /> 19 </Modal> 20 ) : null} 21 </ModalGateway> 22 ) 23 } 24}
The simplest way to define a list of images for the carousel looks like:
1const images = [{ source: 'path/to/image-1.jpg' }, { source: 'path/to/image-2.jpg' }]
However, react-images supports several other properties on each image object than just source
. For example:
1const image = { 2 caption: "An image caption as a string, React Node, or a rendered HTML string", 3 alt: "A plain string to serve as the image's alt tag", 4 source: { 5 download: "A URL to serve a perfect quality image download from", 6 fullscreen: "A URL to load a very high quality image from", 7 regular: "A URL to load a high quality image from", 8 thumbnail: "A URL to load a low quality image from" 9 }; 10}
All these fields are optional except source
. Additionally, if using an object of URLs (rather than a plain string URL) as your source
, you must specify the regular
quality URL.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 5/26 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
103 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