Support

Account

Home Forums Backend Issues (wp-admin) Custom Image Upload save to ACF Image Field in ACF Frontend Form Reply To: Custom Image Upload save to ACF Image Field in ACF Frontend Form

  • I don’t know how you can do this.

    An ACF image field only stores the image ID and there isn’t any way to have ACF store additional data for the image.

    Possible solution:
    1) Store the generated value in a hidden field
    2) Create an acf/save_post filter that gets the hidden value and makes any needed changes to the attachment post for the image or its meta values that you’ll need for displaying this image. Maybe you need to somehow insert the image into the media library and alter the image ID stored by ACF. I am not familiar with how you can do this with the data that will be provided. You might potentially start here https://rudrastyh.com/wordpress/how-to-add-images-to-media-library-from-uploaded-files-programmatically.html