cloudinary-react

Implements Cloudinary React SDK patterns for uploads, transformations, overlays, and video playback.

1|Updated May 26, 2026
One-click install
npx skills add https://github.com/nimdvir/dima-publishing --skill cloudinary-react-nimdvir
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cloudinary-react
Source: https://github.com/nimdvir/dima-publishing/tree/main/.agents/skills/cloudinary-react
Command: npx skills add https://github.com/nimdvir/dima-publishing --skill cloudinary-react-nimdvir

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @cloudinary/react, @cloudinary/url-gen, cloudinary-video-player, cloudinary, and includes references (resource) components.

What problem does it solve? Integrating Cloudinary into React apps often fails due to wrong import paths, misconfigured environment variables, Upload Widget race conditions, and video player DOM conflicts. This Skill provides verified patterns and troubleshooting guidance to avoid these frequent errors. ## Core Features & Use Cases - Opinionated Integration Patterns: Exact import paths for @cloudinary/url-gen, reusable cld instance configuration, and bundler-specific environment variable setup (Vite, CRA, Next.js). - Upload Widget & Signed Uploads: Strict polling-based widget initialization, unsigned presets, and secure signed upload flows with a Node.js backend. - Transformations, Overlays & Video: Canonical overlay code blocks, responsive/lazyload plugin usage, and imperative Cloudinary Video Player setup with cleanup handling. - Use Case: A developer sees "createUploadWidget is not a function" in a Vite app; the Skill supplies the index.html script tag plus setInterval polling pattern that resolves the race condition. ## Quick Start Ask the assistant to set up a Cloudinary image upload widget in your React app using the cloudinary-react skill.

Frequently Asked Questions about cloudinary-react

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up the Cloudinary Upload Widget in React?▼

Add the upload-widget script tag to index.html, then poll with setInterval in useEffect until window.cloudinary.createUploadWidget is a function before creating the widget. Store the widget in a ref, add a timeout for failed loads, and open it from a button click handler.

How do I fix "createUploadWidget is not a function" in React?▼

This error is a race condition: the widget script loads asynchronously. Poll with setInterval checking typeof window.cloudinary?.createUploadWidget === 'function' instead of a single onload check, and ensure the script tag exists in index.html.

What is the difference between signed and unsigned Cloudinary uploads?▼

Unsigned uploads use only a cloud name and unsigned preset, requiring no backend but allowing anyone with the preset name to upload. Signed uploads generate a signature on a server using the API secret, giving control over who can upload in production apps.

Does the Cloudinary React SDK work with Create React App and Next.js?▼

Yes, all patterns work across bundlers; only environment variable access changes. Create React App uses the REACT_APP_ prefix with process.env, Next.js client code uses NEXT_PUBLIC_, and Vite uses VITE_ with import.meta.env.

Why is my VITE_CLOUDINARY_CLOUD_NAME undefined in the browser?▼

Vite may cache old environment values. Delete node_modules/.vite, restart the dev server, and hard refresh the browser. Also confirm the variable uses the VITE_ prefix and is read via import.meta.env, not process.env.

Should I use AdvancedVideo or the Cloudinary Video Player?▼

Use AdvancedVideo from @cloudinary/react to simply display a video with native controls. Use the Cloudinary Video Player package when you need a styled player UI, custom controls, or playlists, which requires an imperative video element created with document.createElement.