Home Forums General Issues Add field to image object


Add field to image object

  • Hi,

    Im using ACF in combination with wordpress REST API. I was wondering if its possible to add extra fields to the image post object.

    When getting the image post object with get field the following fields are retuned:

    ID: ,
    id: ,
    title: "",
    filename: "",
    url: "",
    alt: "",
    author: "",
    description: "",
    caption: "",
    name: "",
    date: "",
    modified: "",
    mime_type: "",
    type: "",
    icon: "",
    width: ,
    height: ,

    I would like to add a orientation field (portrait/landscape).

  • Hi @sdevogel

    Instead of modifying the image field type, would you consider creating a new field type borrowing the features of the image field type?

    There is a neat tutorial on this here:

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Add field to image object’ is closed to new replies.