load-image-react
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

load-image-react

Use blueimp-load-image in React

Installation

npm install load-image-react

Usage

import { Image } from "load-image-react";
 
const SomeComponent = () => {
    return (
        <>
            <h2>My Image</h2>
            <Image
                src="some-image-url.png"
                loadOptions={{
                    downsamplingRatio: 0.5,
                    maxWidth: 200,
                    maxHeight: 200
                }}
            />
        </>
    );
};

Load options

The loadOptions prop is passed into blueimp-load-image. canvas and orientation will always be set to true.

License

Made with 💖 by NewOrbit in Oxfordshire, and licensed under the MIT License

Readme

Keywords

Package Sidebar

Install

npm i load-image-react

Weekly Downloads

7

Version

1.0.2

License

MIT

Unpacked Size

11.1 kB

Total Files

9

Last publish

Collaborators

  • senderek
  • neworbit-admin
  • petevb
  • ksstott
  • thyde1
  • hisuwh