

The File / Image / Video field can store attachments to one or more Media items. It works similar to Relationships in terms of how data is stored and displayed.
Contents
Quick Start
- Fill out the Basic Field Settings (Label, Description, and Field Name)
- Select Field Type: File / Image / Video.
- Click Save New Field (or Save Field if you’re updating an existing field) to save your field configuration.
Settings
- Upload Limit
The available options are:- Single File
- Multiple Files
- Max Number of Files
You can choose how many files to allow for Multiple Files. Default is “0” for no limit, but you can enter 1 or more to limit the number of items that can be selected.
- Max Number of Files
- File Uploader
You can choose what kind of file upload experience you want. The available options are:- Upload and/or Select (Media Library)
- Media Library Default Tab
This is the default tab to show when clicking to choose a new file. Default is “Upload File”. The available options are:- Upload File
- Media Library
- Modal Title
This is the title used in the Media Library modal that opens up when adding or selecting a file. Default is “Attach a file”. - Modal Add Button Text
This is the add button text used for the Add File button within the modal itself. Default is “Add File”.
- Media Library Default Tab
- Upload only (Plupload)
- Upload Directory
This allows you to change where uploads will be saved to on your site folder structure. The available options are:- WordPress Default (/wp-content/uploads/yyyy/mm/)
- Custom directory within the default uploads directory
- Custom Upload Directory
This allows you to enter a path relative to the /wp-content/uploads/ folder on your site. This is where files will be uploaded to when uploaded specifically using this File field.
- Custom Upload Directory
- Restrict File Size
This allows you to limit the file size to a custom size. Valid size suffixes are: GB (gigabytes), MB (megabytes), KB (kilobytes), or B (bytes). This overrides what WordPress uses but may not exceed the maximum upload file size in WordPress. Leave empty to remain unchanged.
- Upload Directory
- Upload and/or Select (Media Library)
- Restrict File Types
This allows you to restrict which types of files can be uploaded and chosen for this File field. The available options are:- Images (jpg, jpeg, png, gif)
- Video (mpg, mov, flv, mp4, etc..)
- Audio (mp3, m4a, wav, wma, etc..)
- Text (txt, csv, tsv, rtx, etc..)
- Any Type (no restriction)
- Other (customize allowed extensions)
- Allowed File Extensions
This allows you to specify file extensions manually. Separate file extensions with a comma (ex. “jpg,png,mp4,mov”).
- Allowed File Extensions
- Add Button Text
This is the text of the Add File button that will be used to upload a file. Default is “Add File”. - For file types set to Images
- List Style
This is the style which files will appear in the form field. The available options are:- Rows
- Tiles
- Output as a WP Gallery
This is a useful option that lets you display your Image(s) as a Gallery.- Gallery Image Links
When using the WP Gallery, you can choose to automatically link the images. The available options are:- Attachment Page
- Media File
- None
- Gallery Image Columns
When using the WP Gallery, you can choose which number of image columns. You can choose between 1-9 columns of images. - Gallery Randomized Order
When using the WP Gallery, you can choose to sort the images in a randomized order. - Gallery Image Size
When using the WP Gallery, you can choose a supported image size to display the images with.
- Gallery Image Links
- List Style
How to Display
By default, Pods will not link to the file URL when displaying. It will display as an image if the media type is an image. Otherwise, nothing will be displayed if there is no image representation of the attachment.
You can also traverse into any attachment’s data by following field() traversal notation which includes displaying specific fields for an attachment or displaying using a specific image size.
Display with a Shortcode
[pods field="my_file_field"]
Display with PHP: pods_field_display()
<?php echo pods_field_display( 'my_file_field' );
Display with PHP: $pod->display()
<?php $pod = pods(); echo $pod->display( 'my_file_field' );
Limitations
Elementor integration
The Elementor integration does not currently support the “Images – Any” option. You can only use the “Images” Restrict File Type option if you want to display images through Elementor. See the following discussions for reference:
- Image field doesn’t work in Elementor if filetype set to Any supported by WP (WordPress.org Forum Topic)
- Elementor Pro updated support for Pods 2.9+ (GitHub feature request for Elementor)
- Pods Image Field dropdown empty when file type is images-any (GitHub issue for Elementor)