Skip to content

getCldImageUrl

You can use the getCldImageUrl helper to get a Cloudinary image URL outside the component. <CldImage /> uses this helper under the hood, so it has all the same props. The main difference is that this won’t react to changes such as the screen width, or generate different sizes of image etc.

Basic Usage

The required options are width, height, and src:

import { getCldImageUrl } from 'svelte-cloudinary';
const url = getCldImageUrl({
src: 'images/turtle',
height: 600,
width: 960,
})