Skip to content

NewOrbit/load-image-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Use blueimp-load-image in React

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •