IURLConfig

config

Description

Defines the configuration needed for URL-related options when creating Cloudinary URL Learn more: URL Parameters

Properties
Name Type Attributes Description
cname string <optional>
secureDistribution string <optional>
privateCdn boolean <optional>
signUrl boolean <optional>
longUrlSignature boolean <optional>
shorten boolean <optional>
useRootPath boolean <optional>
secure boolean <optional>
forceVersion boolean <optional>
analytics boolean <optional>
queryParams object | string <optional>
Examples

			import Cloudinary from '@cloudinary/url-gen';
			// The Cloudinary Instance accepts a URLConfig under the `url` key
			const cld = new Cloudinary({
			 // the cloudConfig
			 cloud: {
			      cloudName: 'demo'
			  },
			  // the urlConfig
			  url: {
			      cname: 'www.example.com',
			      forceVersion: true
			  }
			});

Members


cname :string

Description

Replace the asset domain when secure is false http://{cname}/{cloudName}/image/upload

Details
string

secureDistribution :string

Description

Replace the asset domain when secure is true https://{cname}/{cloudName}/image/upload

Details
string

privateCdn :boolean

Description

When Cname or secureDistribution are provided (with secure accordingly), privateCdn removes the cloudName from the URL:

https://{cname|secureDistribution}/image/upload instead of https://{cname|secureDistribution}/{cloudName}image/upload

When privateCdn is provided without cname or secure distribution, it moves the cloudName from the URL to the domain:

https://{cloudName}-res.cloudinary.com/image/upload instead of https://res.cloudinary.com/{cloudName}/image/upload

Details
boolean

secure :boolean

Description

use HTTPS or HTTP

Details
boolean

analytics :boolean

Description

Whether or not to include the SDK version signature in the URL

Details
boolean

signUrl :boolean

Description

Whether or not to sign the URL

Details
boolean

longUrlSignature :boolean

Description

Whether or not to use a long signature

Details
boolean

shorten :boolean

Description

Whether or not to shorten the URL

Details
boolean

useRootPath :boolean

Description

Whether or not to use the root path

Details
boolean

forceVersion :boolean

Description

Whether or not to force a version

Details
boolean

queryParams :Record.<string, (string|number|boolean)>|string

Description

Additional params to be added to the URL

Details
Record.<string, (string|number|boolean)> | string