Last updated: Sep-26-2023
Upload presets enable you to centrally define a set of asset upload options which can be applied to assets as they are uploaded. By pre-defining these options, you can maintain the uniformity and compliance of your assets.
Upload Presets are a predefined set of upload preferences, which can be applied to uploading assets. The selected upload preset determines the actions that are applied to the assets during upload. Upload presets are defined per product environment.
Common settings you can define in an upload preset include:
- Defining how the assets will be stored and accessed, such as the way the public ID value will be determined, which folders they'll be stored in, and whether existing assets can be replaced by those uploaded with the preset.
- Running add-ons on each uploaded asset, such as auto-tagging or background removal.
- Applying transformations to assets, so that only the transformed copy is kept in your Media Library. For example, if users upload images of themselves to be used as profile pictures, you can set an upload preset to save them already cropped and resized, ensuring that those profiles are uniformly formatted.
- Marking uploaded assets for automatic and/or manual moderation.
In order to use upload presets, first configure one or more upload presets with your desired upload options. The upload preset(s) can then be applied to incoming assets in two different ways:
- Set the upload preset as the Media Library upload preset default. The upload preset will be applied by default to all uploaded assets.
When uploading assets using the Media Library Upload Widget, the user selects an upload preset, appropriate to the relevant upload scenario, from a collection of upload presets that you've configured. For example, all assets used as hero images might be uploaded using an upload preset that transforms them in a certain way and saves them in a specific folder.The upload preset selected by the user when uploading overrides the default upload preset.
With a default upload preset, and/or a system of upload presets that must be applied for each specific use case, you can easily ensure that assets are handled correctly.
From the Cloudinary Console, you can create and manage upload presets.
To create or modify an upload preset, navigate to the Upload page of the Console Settings and 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 options are organized in several tabs. The following sections describe the options in each tab that are relevant to DAM use cases:
- The Storage and Access tab: Contains options that relate to signing mode, naming, storage, access and delivery.
- The Media analysis and AI tab: Contains options for tagging and analyzing assets, also with the aid of optional add-ons.
- The Upload Manipulations tab: Contains options that relate to transforming assets, notifications and manipulations.
- The Upload Control tab: Contains options that relate to moderating assets and specifying advanced upload behavior that affects API calls.
The Storage and Access tab contains a variety of options that relate to signing mode, naming, storage, access and delivery. Choose the options that satisfy your needs.
Here are some of the Storage and Access options commonly used options in the Media Library:
- Signing mode: Upload presets can be either signed or unsigned. Only signed upload presets can be used from the Media Library. Unsigned upload presets allow uploads that are not authenticated, and can therefore be used in client-side code.
Access control mode: You can set the access control mode to either Public or Restricted.NoteThe access control mode feature is a premium feature for our Assets product, and its availability depends on your account setup. If access control mode is not yet enabled for your account and you'd like to enable it, please contact your Customer Support Manager.
Naming and storing incoming assets: The naming options available to you depend on whether your product environment is using fixed or dynamic folder mode. See the table below for a description of the different options in each mode.
Below is a summary of the naming and storing options for dynamic and fixed folder modes:
|Option||Dynamic Folder Mode||Fixed Folder Mode|
|Destination folder||You can optionally specify a value in the Asset folder field to determine the folder where the asset will be placed within the Media Library. The value set here doesn't impact the asset's public ID (unless you also select the Set the public ID path to match the initial asset folder path option).||You can set the destination Folder in the Media Library for where all assets uploaded via this upload preset will be saved, overriding the folder that the user may have selected. The folder you set also automatically defines the URL path to prepend to the public ID of every asset uploaded using this upload preset.|
|Naming convention for the public ID used in delivery||
If you choose the Default option, the public ID is randomly generated.1If you choose the Custom option, you can set the public ID to match the name of the file being uploaded, with or without a randomly generated unique suffix.
|The same options are available in fixed folder mode.|
|URL path (public ID prefix)||
If you choose the Default option, the public ID has no path (no public ID prefix).1
If you choose the Custom option, you can define the URL path (public ID prefix) to prepend to the public ID of every asset uploaded using this upload preset. You can either:
- Set the public ID path to match the initial asset folder path: Sets the public ID prefix to match the name of the asset folder the asset is initially uploaded to. If an asset is later moved to a different folder, the public ID path won't change to reflect the asset's new location.- Prepend this path to the Public ID: Allows you to define a custom public ID prefix.
The URL path (public ID prefix) that's prepended to the public ID is determined by the Folder you select.If an asset is later moved to a different folder, the URL path changes accordingly, which risks breaking links to assets in production.
The display name is a user-friendly name for assets that doesn't impact the delivery URL value.
By default, the asset's display name will be automatically taken from the filename of the uploaded file.1 Alternatively, you can customize the asset's display name to be the same as the public ID (without the prefix).
|Display names don't exist in fixed folder mode.|
|Allow or prevent overwriting existing assets||
When Overwrite is enabled there are several ways to overwrite an asset:
|Overwrite works the same way in fixed folder mode, except that there's no option to overwrite assets based on display name.|
If your organization is using Cloudinary only for DAM use cases, it's usually recommended to Accept the default asset naming settings option (use the uploaded file name as the display name, but a random value for the public ID).
If your organization uses both DAM and Programmable Media, it's recommended to consult with your developers on the preferred behavior.
Here are some of the Media analysis and AI options commonly used in the Media Library:
- Categorization: You can select from a number of add-ons to automatically tag your assets. In addition, you can set a minimum confidence threshold for a tag to be saved.
- Raw convert: You can select an add-on to automatically convert incoming raw files to a specified format.
- You can request different types of analysis to be performed on the assets, or select from a number of add-ons to perform analysis. Some options generate relevant information and others actually change the asset. For example, you can run the OCR add-on to automatically extract text detected in uploaded images, Background removal to automatically remove the background from uploaded assets, or Quality analysis to retrieve quality analysis data for the uploaded image.
The Upload Manipulations tab contains options that relate to transforming assets, notifications and manipulations. Choose the options that satisfy your needs.
Here are some of the Upload Manipulations options commonly used in the Media Library:
- Format: You can specify a format for all assets. If an asset is uploaded in a different format it will be converted to this format before saving it in the Media Library.
- Incoming Transformation: You can open an editor that allows you to build a transformation, such as cropping, special effects, overlays, etc., that will be applied to the asset before saving it in the Media Library.
- Context: You can specify a key-value pairs to annotate the uploaded resources and increase their searchability.
The Upload Control tab contains options that relate to moderating assets and specifying advanced upload behavior that affects API calls. Choose the options that satisfy your needs.
Here are some of the Upload Control options commonly used in the Media Library:
- Allowed formats: You can specify the file formats that will be allowed for uploading.
Auto moderation: You can select one or more types of moderation that you want to apply to every asset uploaded. ImportantIf you select an automatic moderation, you must be subscribed to it, otherwise the moderation will not be applied and the asset will be immediately marked as approved.
When you finish and Save your upload preset definition, the upload preset and its settings are displayed in the Upload page of the Console Settings:
- When defining an upload preset that may be used for both image and video uploads, you can include both image-specific and video-specific upload options (e.g., for moderation or tagging add-ons) and only the relevant options will be used when a file is uploaded with that preset.
- If Dynamic folders mode is enabled on your product environment, there are a variety of additional options available for upload presets, both in the UI and the API. For details, see Dynamic folders - Upload preset options and Dynamic folders - New Upload API parameters.
To control the way all assets are uploaded, you can assign specific signed upload presets to act as the defaults for image, video, and raw uploads.
From the Cloudinary Console, you can assign the default signed upload presets for uploads performed via the API and via the Media Library in the selected product environment:
API upload preset defaults: relates to uploads performed via the API.
Media Library upload preset defaults: relates to uploads performed via the Media Library.
After you set the Media Library upload preset defaults, the relevant default upload preset will then be applied to every asset of that type that is uploaded via the Media Library UI from that point forward, unless a different signed preset is manually selected via the Media Library Upload Widget.