Depending on your use case, you can upload media assets to ImageKit using the following methods:
- From the dashboard - This is the easiest way to upload media assets to ImageKit. If you have a small number of assets, you can upload them directly from the dashboard. The UI lets you import assets from your local machine, a public URL, Dropbox, Google Drive, OneDrive, Unsplash, and Box. You can also upload the entire folder.
- Progrmmatically using API - If you have a large number of assets and want a high degree of customization, you can use the Upload API to upload assets to ImageKit. Check out quick start guides for different technologies.
- Bulk migration using Rclone - Rclone is a command-line program to manage and sync your files on 70+ cloud storage. ImageKit provides integration with Rclone and lets you upload assets to and from ImageKit DAM. Learn more.
Within the dashboard, navigate to the Media Library section. Click the New button in the top right corner and select File or Folder Upload.
You can upload files from your local machine, a public URL, Dropbox, Google Drive, OneDrive, Unsplash, Box, etc.
By default, files are uploaded to the location you have navigated to in the media library. You can also create a new folder and upload files to that folder. But you can change all this in the upload dialog.
Drag and drop files
You can also drag and drop files from your local machine to the media library.
Upload entire folder
You can also upload an entire folder by selecting the folder upload option.
Learn about different upload settings available during upload.
Create new folder
Click on the New button on the top right corner and select New folder option. This will open a popup. Enter the folder name and click the submit. The new folder will be created in your current directory.
Upload settings
During upload, besides file name, you can set many other parameters like tags, auto AI tagging, AI background removal, custom metadata etc. You can apply pre-transformation to modify the images & videos before they are uploaded to ImageKit. You can apply post-transformation to eagerly transform the images & videos once upload is complete. All the parameters that are available in the Upload API are available in the dashboard as well.
You can configure the default upload settings in the Media Library settings. These settings will be applied to all the uploads from the dashboard.
During upload, you have the option to override these settings for the current batch of files. Click on the "Common settings" button to set the parameters for the current batch of files.
You also have the option to set the parameters for individual files. Click on the "Settings" icon for the file you want to set the parameters for.
Here is the list of parameters that you can set during upload:
Extensions
Extensions let you perform certain advanced operations on your assets during upload. To include an extension as an upload parameter, choose the corresponding extension checkbox and configure it as necessary.
Custom focus area
Define an important area in the image during upload. This is an optional field and is only relevant for image-type files.
A custom focus area, like other upload parameters, is optional. However, if configured, all four fields x-coordinate, y-coordinate, height, and width become mandatory.
Generate unique filenames with random suffixes
When this setting is activated, ImageKit automatically appends a random suffix to the file name. This prevents overwriting of existing files by ensuring each file name is unique.
Overwrite files during upload
If a file with an identical name already exists at the destination, activating this setting will create a new version of the file. Conversely, if this setting is off and a file with the same name exists, an error will be generated.
Set files as private during upload
This setting allows you to mark files as private. When this setting is enabled, the file is set as private, which limits access to the original file URL and unnamed transformations without signed URLs. Without the signed URL, only named transformations can be applied to private assets.
Ensure files are published on upload
This option enables you to designate files as either published or unpublished. When activated, the file is marked as published. Files or file versions that are not published can only be accessed through the media library. Learn more about the draft assets.
Overwrite AI tags during upload
If this feature is enabled and a file with the same name already exists at the target destination, the existing AI tags of the file will be replaced with new ones or removed if no tagging extension is applied. Conversely, if this setting is off, the existing AI tags of the file will be preserved in the new version.
Overwrite user-set tags during upload
If this feature is enabled and a file with the same name already exists at the target destination, the user-set tags of the file will be replaced with new ones or removed if no tags are provided. Conversely, if this setting is off, the existing user-set tags of the file will be preserved in the new version.
Overwrite custom metadata during the upload
If this feature is enabled and a file with the same name already exists at the target destination, the custom metadata of the file will be replaced with a new one or removed if no custom metadata is provided. Conversely, if this setting is off, the existing custom metadata of the file will be preserved in the new version.
Pre-transformation
Pre-transformation lets you modify image or video files before they're uploaded. You can only request a single pre-transformation on an asset. This feature is applicable exclusively to image and video files and any valid supported image transformation or video transformation can be applied to their respective files.
Post transformation
Post-transformations help you eagerly generate transformations after an image or video file has been uploaded to ensure fast delivery to your users. This feature is applicable exclusively to image and video files. You can apply several post-transformations to an asset, with a maximum limit of five allowed post-transformations.
Custom metadata
Custom metadata fields can be used to store any type of data about your images in key-value pairs during upload. Before setting any custom metadata on an asset you have to create the field from media library settings or using custom metadata fields API.
Tags
ImageKit enables you to include tags during the upload of assets, this setting is not available in the default upload parameters within the media library settings. Tags can be chosen from an auto-completer or created as new ones.
Webhook URL
You can include a webhookUrl
parameter during file upload. The final status of extensions after they have completed execution will be delivered to this endpoint as a POST request. This setting is not available in the default upload parameters within the media library settings. Learn more about receiving webhook notifications.
File name
The file name cannot be configured as a default upload setting. During upload, file name is automatically set to the original file name. However, you can change it.