seokgyo / react-cloudinary

react components to render cloudinary image and video.
20 stars 4 forks source link

react-cloudinary

Simple wrapper around cloudinary_npm.

installation

npm install react-cloudinary --save

usage

import { cloudinaryConfig, CloudinaryImage, CloudinaryVideo } from 'react-cloudinary';

cloudinaryConfig({ cloud_name: 'xxxx' });

const imagePublicId = 'imagePublicId';
<CloudinaryImage publicId={imagePublicId} options={{ width: 300, height: 300 }} />

const videoPublicId = 'videoPublicId';
<CloudinaryImage publicId={videoPublicId} options={{ width: 300, height: 300, controles: true, preload: 'auto' }} />