Next Cloudinary v6 now available! View Changelog

getCldImageUrl
Basic Usage

Getting Started with getCldImageUrl

You can use the getCldImageUrl helper function to generate Cloudinary URLs without the component wrapper. CldImage and other image-based components use getCldImageUrl or a derivitive of it to generate their images, meaning you can expect the same API from CldImage.

Basic Usage

The basic required options include width, height, and src:

import { getCldImageUrl } from 'next-cloudinary';
 
const url = getCldImageUrl({
  width: 960,
  height: 600,
  src: '<Public ID>'
});