Next Cloudinary v6 now available! View Changelog

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!

If using the Cloudinary Upload Widget and using Signed Uploads, you'll likely also want to also set your Cloudinary API Key and API Secret.

NEXT_PUBLIC_CLOUDINARY_API_KEY="<Your API Key>"
CLOUDINARY_API_SECRET="<Your API Secret>"

The API Key is a publicly available value where the Secret must be kept private only to be used on the server.

Global Configuration

Here are all of the available configurable environment variables for Next Cloudinary:

Note: These are not all required to use the library.

NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="<Your Cloud Name>"
NEXT_PUBLIC_CLOUDINARY_API_KEY="<Your API Key>"
CLOUDINARY_API_SECRET="<Your API Secret>"
 
NEXT_PUBLIC_CLOUDINARY_SECURE_DISTRIBUTION="<Your Secure Distribution / CNAME>"
NEXT_PUBLIC_CLOUDINARY_PRIVATE_CDN="<true|false>"

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy