- Name:
image
- UI: File picker button opens media gallery allowing image files (jpg, jpeg, webp, gif, png, bmp, tiff, svg) only; displays selected image thumbnail
- Data type: File path string
The file widget allows editors to upload a file or select an existing one from the media library. The path to the file will be saved to the field as a string.
Widget Options
For common options, see Common widget options.
Name 17403_383850-f3> |
Type 17403_472c1d-4f> |
Default 17403_9cc069-65> |
Description 17403_0c8b63-da> |
---|---|---|---|
default 17403_e6b6ad-8d> |
string 17403_0628e3-19> |
|
Optional. The default value for the field. Accepts a string. 17403_86d6cf-6a> |
media_folder 17403_24ad6a-cf> |
string 17403_abac90-9e> | 17403_15561a-09> |
Optional. Specifies the folder path where uploaded images should be saved, relative to the base of the repo 17403_437124-cf> |
public_folder 17403_7a1dbb-f0> |
string 17403_4c355e-4e> | 17403_758402-c9> |
Optional. Specifies the folder path where the image uploaded by the media library will be accessed, relative to the base of the built site 17403_7cfbcd-c1> |
media_library 17403_694c52-4f> |
Media Library Options 17403_72780e-a4> |
|
Optional. Media library settings to apply when the media library is opened by the current widget. See Media Library 17403_200298-14> |
choose_url 17403_9fb3c6-63> |
boolean 17403_16e7a5-93> |
|
Optional. When set to |
multiple 17403_0176a1-6f> |
boolean 17403_546e29-42> |
|
Optional. When set to |
Example
name: thumbnail
label: Featured Image
widget: image
default: /uploads/chocolate-dogecoin.jpg
name: 'thumbnail',
label: 'Featured Image',
widget: 'image',
default: '/uploads/chocolate-dogecoin.jpg',