Configure the Vue.js SDK (video tutorial)

Last updated: Feb-22-2023

Overview

Learn how to install and configure the Cloudinary Vue.js SDK in your Vue.js environment.

Video tutorial


Tutorial contents

This tutorial presents the following topics. Click a timestamp to jump to that part of the video.

The Cloudinary Vue.js SDK

Jump to this spot in the video  0:05 The Cloudinary Vue.js SDK provides transformation, optimization, and delivery capabilities that you can implement using code that integrates seamlessly with your existing Vue.js application.

Install the Vue.js SDK

Jump to this spot in the video  0:18 To install the Vue.js SDK, in a terminal run:

Import AdvancedImage and Cloudinary into your project

Jump to this spot in the video  0:33 The AdvancedImage component displays Cloudinary images in your app. To use the AdvancedImage component, add the following import statements into your project:

Configure Cloudinary

Jump to this spot in the video  1:17 To configure the SDK for your product environment, you can set your cloud name (in addition to other configuration parameters) in a new instance of Cloudinary, like this:

Build your Cloudinary image

Jump to this spot in the video  1:55 Use the image method of the Cloudinary instance to reference an image in your product environment. The method takes a public ID as a parameter and returns a CloudinaryImage object. Pass this to the AdvancedImage component to display the image in your app. For example:

Create a parameterized component

Jump to this spot in the video  2:18 You can create a generic image component for your app, which takes a public ID as a parameter, by moving all the code to a component (in this case, CloudImage.vue) and importing the component to App.vue, making the component generic by defining props:

CloudImage.vue

App.vue

Keep learning

Related topics

If you like this, you might also like...

Find Your Credentials
Learn how to find your cloud name, API key and API secret
Optimization Tips
Tips for delivering optimized images
Named Transformations
Simplify & standardize complex delivery URLs

 

Cloudinary Academy

 

Check out the Cloudinary Academy for free self-paced Cloudinary courses on a variety of developer or DAM topics, or register for formal instructor-led courses, either virtual or on-site.

 

✔️ Feedback sent!

Rate this page: