getCldVideoUrl
Basic Usage

Getting Started with getCldVideoUrl

You can use the getCldVideoUrl helper function to generate Cloudinary URLs without the component wrapper.

getCldOgImageUrl is a deritive of getCldImageUrl meaning it generally has the same API, but provides a few defaults for videos in particular, setting the asset type to video and doesn't make available image-specific transformations.

Basic Usage

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

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

Transformations

You can further take advantage of Cloudinary features like dynamically cropping and resizing:

const url = getCldVideoUrl({
  src: '<Public ID>',
  width: 1080,
  height: 1080,
  crop: 'fill',
  gravity: 'auto'
});

Learn More about getCldVideoUrl