Home Forums General Issues Add Image Size to another ACF Field Reply To: Add Image Size to another ACF Field

  • Hi thanks for this,

    I am using

    function my_acf_save_post( $post_id ) {
        // get image id
        $image = get_field('fl_image', $post_id);
        // set the thumbnail URL field key
        $thumbnail_url_field_key = 'fl_afeat';
        // set the value of the thumbnail URL field
        update_field($thumbnail_url_field_key, $image['sizes']['medium'], $post_id);
    // run after ACF saves the $_POST['acf'] data
    add_action('acf/save_post', 'my_acf_save_post', 20);

    but nothing happens when I click on “Update Post”.

    Both fields: fl_image and fl_afeat are image fields with the Image URL option set.

    What would be wrong?