Image Field

Import an image or select one from the media library.

The Image field holds one image: import it, or select it from the media library.

For several images, use the Gallery field.

Configuration

Go to Modern Fields > Fields groups and add the Image field. Its settings are in the inspector:

Effect
Compact fieldShows a small image preview instead of the full image.
Preview aspect ratioCrops the preview shown in the field: Original, Square, Standard, Portrait, Classic, Wide or Tall. The image itself is not cropped.
Circular previewDisplays the preview as a circle, for an avatar or a logo.
Allowed typesThe media types the user can pick.
The Image field settings

Display the image

The field stores the ID of the image, not its URL. Read it with get_field() and let WordPress build the markup, with its responsive sizes:

PHP

To get the URL only, use wp_get_attachment_image_url($image_id, 'large'). Without code, the Field value block displays the field as a native Image block.


User Field

File Field


In this documentation