> ## Documentation Index
> Fetch the complete documentation index at: https://cloudinary.com/documentation/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload with the CLI (video tutorial)

## Overview

Watch this tutorial learn how to use the CLI to create an [upload preset](upload_presets) to transform your images upon upload.

## 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.

## Tutorial contents
This tutorial presents the following topics. Click a timestamp to jump to that part of the video.
### Remove the image backgrounds during upload to Cloudinary
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=0 :sec=05 :player=cld} |Using an upload preset, you can transform your images during upload to Cloudinary.|

### Create an upload preset with the CLI to remove background images
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=0 :sec=13 :player=cld} |Use the `create_upload_preset` command to create an upload preset that invokes Cloudinary AI background removal (`background_removal=cloudinary_ai`). The upload preset also uses the original filename as the public ID (`use_filename=true unique_filename=false`) and ensures an existing file with the same public ID isn't overwritten (`overwrite=false`).<code>cld admin create_upload_preset name=remove_background overwrite=false use_filename=true unique_filename=false type=upload access_mode=public background_removal=cloudinary_ai|

> **NOTE**: `access_mode` is supported for backward compatibility. Use `access_control` instead.

### Upload the images to Cloudinary
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=0 :sec=41 :player=cld} | Use the `upload_dir` command to upload the images with the newly created upload preset.<code>cld upload_dir -f new_toys -p remove_background soft_toys|

### View the new folder in the Media Library
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=0 :sec=52 :player=cld} | The new folder contains the uploaded images without backgrounds.|

## Keep learning

> **READING**:
>
> * Learn more in the [Cloudinary CLI Reference](cloudinary_cli).

> * Read about the Cloudinary CLI in this [blog post](https://cloudinary.com/blog/commanding_cloudinary_through_the_cli).

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

  
  
  
    Get Started with the CLI
    Set up the CLI and get familiar with some basic commands 
  

  
  
  
    Scripting with the CLI
    Use a script to create an animated GIF 
  

  
  
  
    Postman Collections
    Get set up with the collections and make your first request 
  

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