Installation

Installing Next Cloudinary

Getting Started

Installation

npm install next-cloudinary

Configuration

Add the following variable to your .env.local or .env file.

NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="<Your Cloud Name>"

Don't have a Cloudinary account? Sign up for free on cloudinary.com!

You can find more detailed instructions for components that may require other configuration such as an API key on the component's Basic Usage page.

Using Next Cloudinary

Learn how to add one of the Next Cloudinary components:

  • CldImage: Optimize Cloudinary images with ready-to-use transformations
  • CldOgImage: Easy-to-use OG Image and Social Media Cards
  • CldUploadButton: Drop-in button that opens the Cloudinary Upload Widget
  • CldUploadWidget: Cloudinary Upload Widget with a customizable UI
  • CldVideoPlayer: Deliver Cloudinary video assets with a customizable player

Or use the helper methods to generate URLs:

  • getCldImageUrl: Construct a Cloudinary image URL using the same API as CldImage
  • getCldOgImageUrl: Create a Cloudinary image URL specifically for OG Images or Social Media Cards