1.0.1 • Published 5 years ago
cloudresizer-react v1.0.1
cloudresizer-react
A React component to resize and cache images via CloudResizer.
Installation
$ npm install --save cloudresizer-reactHow to use
Wrap the <img> element with the <CloudResizer> component containing your username and any transformations you want.
import { CloudResizer } from 'cloudresizer-react';
<CloudResizer username="your_username" width="600">
  <img src="https://example.com/bird.html alt="Bird" />
</CloudResizer>Required:
- username
Optional:
- width,- height,- fit,- background,- format. Please refer to CloudResizer documentation for full details.
Publishing
To compile the code once, run
- npm run build
To compile the code once and refresh on file change, run
- npm run start
To publish the package to npm, make sure you're logged in the correct account by running
- npm login
Compile by running
- npm run build
Update the package version accordingly by using
Then publish your package by running
- npm publish