Home Forums General Issues Extending acf_field_image Reply To: Extending acf_field_image

  • There are several problems with doing this.

    The first is that I don’t think you can extend an existing ACF field in this way, but I’ve never tried so I can’t really say and I don’t know of any examples where this has been done.

    The second is that even if you do extend the field there is nowhere in the database for ACF to store these values. An ACF image field stores only the image ID value of the image. Adding inputs to a field that are filled in when editing a page will not cause these values to actually be stored anywhere unless you add code that will take those values and store them in some way.

    The only way that you’ll be able to do this is to build a new field type from scratch You can start by copying the existing image field and you’ll need to add your new information and then store the image ID plus your new values as an array of values instead of just storing the image ID. In acf each field has only one value stored in the database.