> ## Documentation Index
> This page is part of the Image and Video APIs product. Fetch the complete documentation index for Image and Video APIs at: https://cloudinary.com/documentation/llms-image-and-video-apis.txt?referrer=docpage and then use it to discover all relevant pages before exploring further.
> If your task extends beyond this product, fetch the top-level index covering all Cloudinary products and topics at: https://cloudinary.com/documentation/llms.txt?referrer=docpage

# Upload images in Node.js (video tutorial)

[githublink]: https://github.com/cloudinary-community/cloudinary-examples/tree/main/examples/node-image-upload

## Overview

Learn how to upload assets in Node.js using the Cloudinary Node.js SDK.

## Video tutorial

  This video is brought to you by Cloudinary's video player - embed your own!Use the controls to set the playback speed, navigate to chapters of interest and select subtitles in your preferred language.
{videoTranscript:publicId=training/Node.js_Image_Upload}

> **View the code :custom-icon='https://cloudinary-res.cloudinary.com/image/upload/v1778586152/docsite/brand-assets/github.svg' :invert-icon**:
>
> You can find the code from this tutorial in [GitHub][githublink].
## Tutorial contents
This tutorial presents the following topics. Click a timestamp to jump to that part of the video.
### Upload one image using the Node.js SDK
{table:class=tutorial-bullets}|  | 
| --- | --- |
| | Having [installed and configured the Cloudinary Node.js SDK](node_configuration_tutorial), you can upload an image using the `upload` method of the [Upload API](image_upload_api_reference#upload).  For example:
|

```nodejs
const image = './images/my_image.jpg';

cloudinary.uploader.upload(image).then(result => {
  console.log(result);
})
```

### Use the async await syntax
{table:class=tutorial-bullets}|  | 
| --- | --- |
| | Alternatively, you can use the async await syntax.  For example:
|

```nodejs
const image = './images/my_image.jpg';

(async function run() {
  const result = await cloudinary.uploader.upload(image);
  console.log(result);
})();
```

### Upload multiple images
{table:class=tutorial-bullets}|  | 
| --- | --- |
| | If you want to upload multiple images you can loop through an array, calling the same function.  For example:
|

```nodejs
const images = [
  './images/image1.jpg',
  './images/image2.jpg',
  './images/image3.jpg',
  './images/image4.jpg',
  './images/image5.jpg',
];

(async function run() {
  for (const image of images) {
    const result = await cloudinary.uploader.upload(image);
    console.log(result.secure_url);
  }
})();
```

### Upload using an image URL
{table:class=tutorial-bullets}|  | 
| --- | --- |
| | So far we've been using local file paths, but you can use [many different file sources](upload_parameters#required_file_parameter) for your images, for example an image URL:
|

```nodejs
const url = 'https://example.com/myimage.jpg';

(async function run() {
  const result = await cloudinary.uploader.upload(url);
  console.log(result);
})();
```

## Keep learning

> **READING**:
>
> * Learn more about [uploading images and videos using the Node.js SDK](node_image_and_video_upload).

> * Take a look at our [Upload guide](upload_images) to learn about uploading to Cloudinary in general.

> * Use the [Upload API reference](image_upload_api_reference) to find all the options and parameters available for the SDK.

> * Watch more [Dev Hints videos](https://www.youtube.com/playlist?list=PL8dVGjLA2oMpaTbvoKCaRNBMQzBUIv7N8) on the [Cloudinary YouTube channel](https://www.youtube.com/cloudinary).

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

[Configure the Node.js SDK](node_configuration_tutorial)

Install and configure the Cloudinary Node.js SDK

[Upload Videos in Node.js](upload_videos_in_node_tutorial)

Upload videos to Cloudinary using the Node.js SDK

[Upload Widget](upload_widget_tutorial)

Embed an Upload Widget in your site

&nbsp;

&nbsp;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.
&nbsp;