Git Product home page Git Product logo

cloudinary-react's Introduction

Cloudinary React Library

Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline.

Easily upload images to the cloud. Automatically perform smart image resizing, cropping and conversion without installing any complex software. Integrate Facebook or Twitter profile image extraction in a snap, in any dimension and style to match your website’s graphics requirements. Images are seamlessly delivered through a fast CDN, and much much more.

Cloudinary offers comprehensive APIs and administration capabilities and is easy to integrate with any web application, existing or new.

Cloudinary provides URL and HTTP based APIs that can be easily integrated with any Web development framework.

Installation

NPM

  1. Install the files using the following command. Use the optional --save parameter if you wish to save the dependency in your bower.json file.

    npm install cloudinary-react --save
  2. Include the javascript files in your code. For Example:

    import {Image} from 'cloudinary-react';

Setup

In order to properly use this library you have to provide it with a few configuration parameters. All configuration parameters can be applied directly to the element or using a CloudinaryContext element.

ReactDOM.render(
            <div>
                <h1>Hello, world!</h1>
                <Image cloudName="demo" publicId="sample" width="300" crop="scale"/>
                // Or for more advanced usage:
                // import {CloudinaryContext, Transformation} from 'cloudinary-react';
                <CloudinaryContext cloudName="demo">
                    <Image publicId="sample">
                        <Transformation width="200" crop="scale" angle="10"/>
                    </Image>
                </CloudinaryContext>
            </div>,
            document.getElementById('example')
    );

Required:

  • cloudName - The cloudinary cloud name associated with your Cloudinary account.

Optional:

  • privateCdn, secureDistribution, cname, cdnSubdomain - Please refer to Cloudinary Documentation for information on these parameters.

Usage

The library includes 4 Elements:

  • CloudinaryContext
  • Image
  • Video
  • Transformation

CloudinaryContext

CloudinaryContext allows you to define shared parameters that are applied to all children elements.

Image

The Image element defines a Cloudinary Image tag.

Video

The Video element defines a Cloudinary Video tag.

Transformation

The Transformation element allows you to defined additional transformations on the parent element.

For example:

<Image cloudName="demo" publicId="sample">
    <Transformation angle="-45"/>
    <Transformation effect="trim" angle="45" crop="scale" width="600">
      <Transformation overlay="text:Arial_100:Hello" />
    </Transformation>
</Image>

The Cloudinary Documentation can be found at: http://cloudinary.com/documentation

Additional resources

Additional resources are available at:

Support

You can open an issue through GitHub.

Contact us at http://cloudinary.com/contact.

Stay tuned for updates, tips and tutorials: Blog, Twitter, Facebook.

Join the Community

Impact the product, hear updates, test drive new features and more! Join here.

License

Released under the MIT license.

cloudinary-react's People

Contributors

asisayag2 avatar christiannwamba avatar danashalev avatar danashalev100 avatar dependabot[bot] avatar eitanp461 avatar independentcontractor avatar itaibenari avatar lisamartin00 avatar stevez86 avatar strausr avatar tallevami avatar tocker avatar yakirp avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.