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

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i cloudresizer-react

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

6.25 kB

Total Files

6

Last publish

Collaborators

  • cloudresizer