Upload with the CLI (video tutorial)
Last updated: Sep-02-2024
On this page:
Overview
Watch this tutorial learn how to use the CLI to create an upload preset to transform your images upon upload.
Video tutorial
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 the Cloudinary AI Background Removal add-on (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 is not 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
|
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...
Get Started with the CLI
Set up the CLI and get familiar with some basic commandsScripting with the CLI
Use a script to create an animated GIFGet Creative with the CLI
Create an image sprite from pages of a PDF
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.
✖️