Upload Config
Other than the file sources, you can control how your users interact with the uploader and what they can and can't do.
Attributes
Color Scheme
The Color Scheme attribute customizes the uploader's interface, offering light
, dark
, and system
options. The light
scheme is bright and default, dark
is eye-friendly for low-light, and system
adapts to device settings for a personalized experience.
Default: light
Allowed values: light
, dark
and system
Language
The Language attribute determines the language used in the uploader's interface. It supports multiple languages, enabling users to select their preferred language for interaction.
Default: en
Allowed values: en
, de
, es
, fr
, he
, it
, nl
, pl
, pt
, ru
, tr
, uk
, zh-TW
, zh
Image Only
The Image Only attribute is a boolean setting that determines whether the uploader accepts only image files. When set to true
, users can upload only image formats (e.g., JPEG, PNG). If set to false
, the uploader accepts a broader range of file types.
Default: true
Allowed values: true
, false
Allowed File Types
The Allowed File Types field specifies the specific image file types that users are permitted to upload. To ensure only certain image formats are accepted, input the required format, such as image/png
. If this field is left blank, the uploader may impose no additional restrictions beyond the Image Only setting.
Default: blank
Allowed values: image/png
, image/jpeg
, image/gif
, image/webp
, image/svg+xml
, image/bmp
, image/tiff
, image/x-icon
Pre-populated Files
The Pre-populated Files field allows you to pre-fill the uploader with images that were previously uploaded to your Uploadcare account. This is achieved by providing a list of Uploadcare URLs. If left blank, no images are pre-populated.
The list must be Uploadcare URLs. This is because the plugin pulls the UUID from each URL to populate the uploader.
Default: blank
Allowed values: List of Uploadcare URLs
Min # of Files
The Min # of Files field specifies the minimum number of files that must be uploaded. A value of 0
indicates no minimum limit on the number of files. This means that users can upload any number of files, including none at all.
Default: 0
Allowed values: numeric
Max # of Files
The Max # of Files field specifies the maximum number of files that can be uploaded. A value of 0
indicates no limit on the number of files. This allows users to upload any number of files without restriction.
Default: 0
Allowed values: numeric
Files View Mode
Display the uploaded files in either a list or grid layout.
Default: list
Allowed values: list, grid
Allow Image Editing
The Allow Image Editing field determines whether users can edit images after they have been uploaded. When set to true
, users have access to basic image editing tools to modify the images as needed.
Default: true
Allowed values: true
, false
Max Local File Size
The Max Local File Size (in bytes) field specifies the maximum size of files that users can upload. A value of 0
indicates that there is no limit on the file size.
Default: 0
Allowed values: numeric
Store File
The Store File setting determines whether a file is retained on upload. If set to 0
, the file is not stored and will be automatically deleted after 24 hours by Uploadcare. If set to 1
, the file will be preserved. The auto
value defaults to the project settings. It is recommended to manage this setting in your Uploadcare settings and leave this on auto
.
Default: auto
Allowed values: auto
, 1
, 0
Shrink Image
Default: blank
Crop Preset
The Crop Preset feature allows you to restrict the image crop to a specific aspect ratio. Enter your desired aspect ratio in standard numerical format, such as "1:1" for a square, ensuring your images maintain consistent dimensions across all uploads. This feature helps streamline image preparation for various design needs.
Default: blank
Convert to Base64
The Convert to Base64 option allows you to convert each uploaded image to base64 format. Enable this feature by setting its value to true
, and the images will be outputted in the 'List of base64' state. This conversion may increase computation and Work Units (WU).
Default: false
Allowed values: true
, false
Base64 Output Options
Sets the structure of the base64 data.
Plain: Only the data string will be returned.
Data URI: The Data URI will be included in the output.
API: The response will be an array of objects ready for API requests.
Default: Data URI
Allowed values: Plain
, Data URI
, API
Accent Color
To customize the appearance of your modal, you can change the accent color used for elements such as buttons and icons.
Default Value: #FFDA57
Allowed Values: Any valid hex color code (e.g., #3498db
for a blue accent).
Debug Mode
Enable or disable debug mode to log events from Uploadcare in the console.
Default Value: false
Allowed Values: true
, false
Last updated