Upload with the CLI (video tutorial)
Last updated: Aug-25-2025
Overview
Watch this tutorial learn how to use the CLI to create an upload preset to transform your images upon upload.
On this page:
Video tutorial
This video is brought to you by Cloudinary's video player - embed your own!
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
Using an upload preset, you can transform your images during upload to Cloudinary. |
Create an upload preset with the CLI to remove background images
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 ).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
Use the upload_dir command to upload the images with the newly created upload preset.cld upload_dir -f new_toys -p remove_background soft_toys
|
View the new folder in the Media Library
The new folder contains the uploaded images without backgrounds. |
Keep learning
Related topics
- Learn more in the Cloudinary CLI Reference.
- Read about the Cloudinary CLI in this blog post.
If you like this, you might also like...
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.
✖️