Media Image

Media image allows to select images using WordPress Media Library.

Field Parameters

Name Type Default Description
type string ‘media-image’ Value identifies the field types.
id string Identifies unique ID for the field. It must be different from other existing field IDs
title string Displays the field label.
desc string Describe the field option in details, appears underneath the field control.
required array Acts like boolean operator and provides the parent, comparison operation, and value which decides the field visibility.
value string Display default string in the text input.
attribute string src allow to decide whether you take image ID or Source. Available value is: src, id
size string full allow to define image size as large, medium, and thumbnail

Example Declaration

    'type'  => 'media-image',
    'id'    => 'image',
    'title' => esc_html__( 'Label', 'ultimate-page-builder' ),
    'desc'  => wp_kses_post( __( 'Description', 'ultimate-page-builder' )),
    'value' => '',
    // 'attribute'=>'src' // id, src
    // 'size'=>'full' // large, medium, thumbnail etc...
  • attribute - If you want to use media image id then you can use it with value id. Default value is src.
  • size - Media image size, default is: full.

results matching ""

    No results matching ""