New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cloudinary/react

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudinary/react

Cloudinary React SDK

  • 1.14.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28K
decreased by-4.85%
Maintainers
1
Weekly downloads
 
Created
Source

Cloudinary React SDK

About

The Cloudinary React SDK allows you to quickly and easily integrate your application with Cloudinary. Effortlessly optimize and transform your cloud's assets.

Note

This Readme provides basic installation and usage information. For the complete documentation, see the React SDK Guide.

Table of Contents

Key Features

Version Support

SDK VersionReact 16React 17React 18
1.0.0 & upVVV

Installation

Install using your favorite package manager (yarn, npm)

npm i @cloudinary/url-gen @cloudinary/react --save

Or

yarn add @cloudinary/url-gen @cloudinary/react --save

Usage

Setup

import React from 'react';
import { AdvancedImage } from '@cloudinary/react'
import { Cloudinary } from '@cloudinary/url-gen';

Transform and Optimize Assets

import { AdvancedImage } from '@cloudinary/react'
import { Cloudinary } from '@cloudinary/url-gen';

const myCld = new Cloudinary({
  cloud: {
    cloudName: "demo",
  },
});

let img = myCld.image('sample');

const App = () => {
  return <AdvancedImage cldImg={img}/>
};

Generate Image and Video HTML Tags

- Use <AdvancedImage> to generate image tags
- Use <AdvancedVideo> to generate video tags

Advanced Plugin Features

import { CloudinaryImage } from "@cloudinary/url-gen";
import {
  lazyload,
  responsive,
  accessibility,
  placeholder
} from "@cloudinary/react";

cloudinaryImage = new CloudinaryImage("sample", { cloudName: "demo" });

const App = () => {
  return <AdvancedImage cldImg={img} plugins={[lazyload(),responsive(), accessibility(), placeholder()]} />;
};

You can omit any plugin, but the order from above should remain.

File upload

This SDK does not provide file upload functionality, however there are several methods of uploading from the client side.

Contributions

  • Ensure tests run locally (npm run test)
  • Open a PR and ensure Travis tests pass

Get Help

If you run into an issue or have a question, you can either:

About Cloudinary

Cloudinary is a powerful media API for websites and mobile apps alike, Cloudinary enables developers to efficiently manage, transform, optimize, and deliver images and videos through multiple CDNs. Ultimately, viewers enjoy responsive and personalized visual-media experiences—irrespective of the viewing device.

Additional Resources

License

Released under the MIT license.

FAQs

Package last updated on 28 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc