Skip to main content


This control creates a file upload interface.

<Control type="file" name="file_name" label="File control" />


  • default - Defines the default value of the control.
    Type: string
  • label - Defines the label of the control which will be displayed in the page builder.
    Type: string
  • max_upload - Defines the maximum number of files that can be added.
    Type: number
  • name - Defines the name of the control which will be referenced to render the control value.
    Type: string

Rendering the control value

The value can be rendered in a template using Loop to loop through the file fields. See the attachment loop for available fields.

<Loop control=file_name>
<li>ID: <Field id /></li>
<li>URL: <Field url /></li>
<li>Alt: <Field alt /></li>
<li>Title: <Field title /></li>
<li>Caption: <Field caption /></li>
<li>Description: <Field description /></li>

In a style, use the standard syntax to refer to SASS variables.

.style {
background-image: url('#{$file_name}');


In Gutenberg

In Elementor

In Beaver Builder