Options
To configure the module, you can use cloudinary
section in nuxt.config.js
.
export default {
cloudinary: {
// Cloudinary configuration options
}
}
Cloudinary options
cloudName
- Type:
String
- Required
The cloud name associated with your Cloudinary account. It is used to configure and enable Cloudinary features such as generating delivery asset URL.
export default {
cloudinary: {
cloudName: '<your-cloud-name>'
}
}
Cloud name presents in every delivered URL from Cloudinary, hence it's important to have it configured correctly.
You can find your cloud name details in Dashboard page, or in Account Settings page in Cloudinary console
apiKey
- Type:
String
Required
only when you need to use Upload on server-side
The API Key associated with your Cloudinary account. It is used to configure and enable signed (secured) Upload features on the server-side.
export default {
cloudinary: {
apiKey: 'your-api-key'
}
}
You can find your API Key in your Cloudinary Dashboard page, or in Settings/Security page in Cloudinary console
You need both apiKey
and apiSecret
in order to have server-side upload feature configured correctly. These private keys should be kept as environment variables in .env
.
apiSecret
- Type:
String
Required
only when you need to use Upload on server-side
The API Secret Key associated with your Cloudinary account. It is used to configure and enable signed (secured) Upload features on the server-side.
export default {
cloudinary: {
apiSecret: 'your-api-secret-key'
}
}
You can find your API Secret Key in your Cloudinary Dashboard page, or in Settings/Security page in Cloudinary console
You need both apiKey
and apiSecret
in order to have server-side upload feature configured correctly. These private keys should be kept as environment variables in .env
.
secure
- Type:
Boolean
- Default:
true
Force secure HTTPS delivery urls for all assets (images + videos) generated by Cloudinary, even if they are embedded in HTTP originally.
Disable this flag to have all delivery urls built with HTTP protocol instead.
export default {
cloudinary: {
secure: false
}
}
secureDistribution
- Type:
String
- Relevant only when
secure
istrue
Set custom domain name for building secure HTTPS urls.
export default {
cloudinary: {
secureDistribution: 'your-custome-domain-name'
}
}
Only relevant if you are Advanced plan Cloudinary user with private CDN distribution and custom CNAME set. You can see more details here
cname
- Type:
String
- Use only when
secure
isfalse
Set custom domain name for building non-secure HTTP urls.
export default {
cloudinary: {
cname: 'your-custome-domain-name'
}
}
Only relevant if you are Advanced plan Cloudinary user with private CDN distribution and custom CNAME set. You can see more details here
privateCdn
For version 1.0.2 and below, please use privateCDN
instead.
- Type:
Boolean
- Default:
false
Set to true
if you'd like to use private CDN distribution.
export default {
cloudinary: {
privateCDN: true
}
}
Only relevant for Advanced plan Cloudinary users. You can see more details here
Module build options
useComponent
- Type:
Boolean
- Default:
false
Enable it to use ready-made Vue components for images and videos embedded with Cloudinary functionalities.
export default {
cloudinary: {
useComponent: true
}
}
From v1.0.0+
, you can access $cloudinary
to build urls or element tags needed for images and videos even when useComponent
is enabled.