This is the
legacyversion of the Vue.js SDK (
cloudinary-vue
v1.x).
For details on migrating to the current version of the SDK (frontend-frameworks
v1.x + js-url-gen
v1.x), see the Vue.js SDK migration guide.
Cloudinary's Vue.js SDK provides simple, yet comprehensive image and video upload, transformation, optimization, and delivery capabilities that you can implement using code that integrates seamlessly with your existing Vue.js application.
This guide relates to the latest released version of the Cloudinary Vue.js library.For details on all new features and fixes from previous versions, see the CHANGELOG.
Quick exampleTake a look at the following transformation code and the image it delivers:
This relatively simple code performs all of the following on the original front_face.jpg image before delivering it:
And here's the URL that would be included in the image tag that's automatically generated from the above code:
In a similar way, you can transform a video.
Vue.js SDK featuresThe Vue.js SDK is available as open source at https://github.com/cloudinary/cloudinary-vue. There is also a tool for integrating Cloudinary into your Vue.js project at https://github.com/cloudinary/vue-cli-plugin-cloudinary.
1. Install the Vue.js SDKThe Cloudinary Vue.js SDK serves as a layer on top of Cloudinary's JavaScript (cloudinary-core) library. Install the SDK by running the following command:
2. Set Cloudinary configurationTo use the Cloudinary Vue.js components, you must configure at least your product environment cloudName
. You can additionally define a number of optional configuration parameters if relevant. You can find your product environment-specific configuration credentials on the API Keys page of the Cloudinary Console Settings.
cloud_name
is required to be configured, and not your API key or secret. Your API secret should never be exposed on the client side, so if you want to use signed uploads or generate delivery signatures, you'll also need server-side code, for which you can use one of our backend SDKs.secure
configuration parameter is false
. However, for most modern applications, it's recommended to configure the secure
parameter to true
to ensure that your transformation URLs are always generated as HTTPS.The following 5 Cloudinary Vue.js components are available:
poster
attribute of the generated video
tag.You can apply these options globally on the app level, directly to each component, or you can apply them to all child components using a CldContext
component.
For example:
cld-context
applies to all child components:The JavaScript cloudinary-core library is the foundation library underlying Cloudinary's Vue.js SDK. You can access any of the core JavaScript functionality within your Vue.js code after importing the cloudinary-core
library. For example:
When using the Vue.js SDK, keep these guidelines in mind:
kebab-case
. For example: public-id (camelCase
is also supported)PascalCase
. For example: CldImagePascalCase
or kebab-case
. For example: CldImage or cld-imageObject
You can try out Cloudinary components quickly and easily with our Vue SDK Storybook, which provides you with a rich visual interface, code playground and inline documentation.
To start experimenting with the storybook, select a component from the left-hand menu. You can enter your cloud name and public ID to view an asset from your product environment, or you can view the asset displayed from Cloudinary's demo
product environment. Change parameters and see what happens; the display immediately reflects the changes you make. When you've achieved the desired effect, you can copy that code to conveniently implement the results.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4