Upload presets enable you to centrally define a set of asset upload options instead of specifying them in each upload call. You can define multiple upload presets and apply different presets in different upload scenarios.
Some use-cases for using upload presets include:
- Generating eager transformations for uploaded files. This is especially valuable for video transformations that may take longer to generate and helps to ensure your uploaded files will be ready for delivery.
- Applying incoming transformations while uploading a file, for example to limit format types or file size before storing uploaded files in your Cloudinary account.
- Pre-defining eager transformations that should be prepared for all assets uploaded with a particular preset, so they are ready for fast delivery.
- Applying add-on capabilities, such as auto-tagging or automatic moderation, to your uploads.
- Managing the behavior of user-generated content uploads without modifying the website or mobile app code.
- Setting up default upload behavior for uploads via the Media Library or via Upload commands.
- As upload preferences for uploads via the Upload widget.
To create or modify an upload preset using the Upload Preset UI, log into the Management Console and select Settings > Upload and then scroll to the Upload presets section.
- Create a new upload preset by clicking Add upload preset at the bottom of the upload preset list.
- Click Edit to modify an existing preset.
- To base a new upload preset on an existing one, click Duplicate on the relevant upload preset. The new copy is added to the bottom of the list with a random name. You can then click Edit on the newly created upload preset to modify its name and update the settings as needed.
The upload preset page includes several sections where you can set a variety of upload options.
The most important thing to consider when creating a new upload preset is whether you want the upload preset to be signed or unsigned. For example, only signed presets can be used as the default upload preset for the Upload API or Media Library or if you are implementing signed uploads for your application. Conversly, in most cases, you will need to use unsigned upload presets when implementing unsigned upload capabilities from your client-side app or when using the upload widget within a client-side app.
In general, the options in the Upload Preset interface parallel the parameters you can set in an Upload API command. However, there are some options that may be available only programmatically. Those that are unavailable usually relate to specific sub-options of some of the add-ons or those related to complex transformation options, which might be relevant if you are defining eager or incoming transformations for your upload preset.
When you finish and Save your upload preset definition, the upload preset and its settings are displayed in the Upload Settings page:
This video walks you through the steps of registering for several automatic tagging and image analysis add-ons, and then creating an upload preset in the Management console that applies these add-ons, so that you can automatically tag and analyze every image that is uploaded using that preset.
You can use the
upload_preset method of the Admin API to create, manage, or delete upload presets, either via a REST API call, any of our server-side SDKs. If you don't have a server-side application, you can manage upload presets programmatically using the Cloudinary CLI.
For example, the following code creates a new unsigned upload preset called
my_preset, requests automatic-tagging using the Google tagging add-on engines for both images and videos, removes the backgrounds for images, and uploads to a folder called
You can similarly use the Admin API to list, modify or delete existing upload presets. For complete details, see the upload_preset method in the Admin API Reference.
In situations where an upload preset is used, and parameters are also passed in the upload request, the following precedence rules are followed in the case that a parameter is passed in the request and in the preset:
For signed uploads: parameters given with the request take precedence over upload preset parameters.
For unsigned uploads:
tagsparameters in the upload preset take precedence.
- The rest of the supported upload parameters take precedence over the upload preset parameters (the same as with signed).
From the Upload settings, you can also individually select signed upload presets that will act as the Default upload presets for images, videos, and raw files respectively. You can select one set of presets for API calls and another set for uploads via the Media Library. The settings in these default presets are applied to all uploads of the relevant asset type whenever no other upload preset is specified directly in an upload call or via the upload widget in the Media Library.