From bd6cc9c53d192f3841cb3609085c9de1ab933d3f Mon Sep 17 00:00:00 2001 From: Nick Spaargaren Date: Thu, 12 Nov 2020 08:30:51 +0100 Subject: [PATCH 1/2] added lazyloading option --- src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.js b/src/index.js index 5580377..40006d1 100644 --- a/src/index.js +++ b/src/index.js @@ -21,6 +21,7 @@ export default class extends Component { medium, large, alt, + loading, hideDownload, hideZoom, showRotate, @@ -41,6 +42,7 @@ export default class extends Component { src={small} srcSet={smallSrcSet} alt={alt} + loading={loading} /> {modalOpen && ( Date: Thu, 12 Nov 2020 08:34:56 +0100 Subject: [PATCH 2/2] Added lazy load description in README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8ff2de4..532e51e 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ import ModalImage from "react-modal-image"; | `hideZoom` | `boolean` | Optional. Set to `true` to hide zoom-button from the Lightbox. | | `showRotate` | `boolean` | Optional. Set to `true` to show rotate-button within the Lightbox. | | `imageBackgroundColor` | `String` | Optional. Background color of the image shown in Lightbox. Defaults to black. Handy for transparent images.   | +| `loading` | `String` | Optional. Set to `lazy` to lazy-load the thumbnail images. | ## Lightbox-only API for advanced usage