1.0.1 • Published 4 years ago

cloudresizer-react v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

cloudresizer-react

A React component to resize and cache images via CloudResizer.

Installation

$ npm install --save cloudresizer-react

How 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:

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