Image & Video APIs

React Native SDK

Last updated: Dec-01-2025

The Cloudinary React Native SDK provides simple, yet comprehensive image and video transformation, optimization, and delivery capabilities that you can implement using code that integrates seamlessly with your React Native application.

SDK security upgrade, June 2025
We recently released an enhanced security version of this SDK that improves the validation and handling of input parameters. We recommend upgrading to the latest version of the SDK to benefit from these security improvements.

How would you like to learn?

Resource Description
Cloudinary React Native SDK GitHub repo Explore the source code and see the CHANGELOG for details on all new features and fixes from previous versions.

Install

Cloudinary's React Native library is available as an open-source NPM package. To install the library, run:

Note
The React Native SDK has a dependency on the Expo module. If you're not using Expo in your project, you will need to install the module separately in order to use the SDK.

Note
The React Native library must be used in conjunction with the JavaScript js-url-gen library to provide all of Cloudinary's transformation and optimization functionality.

Two GitHub repositories provide all the functionality:

  • js-url-gen contains all the functionality required to create delivery URLs for your Cloudinary assets based on the configuration and transformation actions that you specify. All the js-url-gen functionality is installed through the @cloudinary/url-gen package.
  • frontend-frameworks contains the framework libraries and plugins that can be used to render images and videos on your site. There are different installation packages for each framework, so for example, React is installed through @cloudinary/react, the Angular SDK is installed through @cloudinary/ng and the Vue.js SDK is installed through @cloudinary/vue.

Configure

You can specify the configuration parameters that are used to create the delivery URLs, either using a Cloudinary instance or per image.

Note
Specify the configuration parameters in camelCase, for example cloudName.

Cloudinary instance configuration

If you want to use the same configuration to deliver all your media assets, it's best to set up the configuration through a Cloudinary instance, for example:

You can set other configuration parameters related to your cloud and URL as required, for example, if you have your own custom delivery hostname, and want to generate a secure URL (HTTPS):

Asset instance configuration

If you need to specify different configurations to deliver your media assets, you can specify the configuration per image instance, for example:

Use

Once you've installed and configured the React Native SDK, you can use it to transform and deliver your images and videos.

Quick example: File upload

The following React Native code uploads the dog.mp4 video using the public_id, my_dog. The video overwrites the existing my_dog video if it exists. When the video upload finishes, the specified notification URL receives details about the uploaded media asset.

The result of the upload API call is an object that provides information about the uploaded media asset, including the assigned public ID and its URL.

Learn more about upload

Quick example: Transform and optimize

Take a look at the following transformation code and the image it delivers:

This code creates the HTML required to deliver the front_face.jpg image with the sepia effect applied.

sample transformation

You can apply more than one transformation at a time (see chained transformations) to give more interesting results:

sample transformation

This relatively simple code performs all of the following on the original front_face.jpg image before delivering it:

  • Crop to a 150x150 thumbnail using face-detection gravity to automatically determine the location for the crop
  • Round the corners with a 20 pixel radius
  • Apply a sepia effect
  • Overlay the Cloudinary logo on the southeast corner of the image (with a slight offset). The logo is scaled down to a 50 pixel width, with increased brightness and partial transparency (opacity = 60%)
  • Rotate the resulting image (including the overlay) by 10 degrees
  • Convert and deliver the image in PNG format (the originally uploaded image was a JPG)

Tip

There are alternative ways to apply transformations to your images, for example:

Learn more about transformations

Related topics

✔️ Feedback sent!

Rate this page: