how to display image in custom post type from frontend form using advanced custom field?

here is my code: employeedetails.php

<div class="container submit-message">     <h1>Employee Form</h1>     <form id="enquiry_email_form" action="#" method="POST" data-url="<?php echo admin_url('admin-ajax.php'); ?>" enctype="multipart/form-data">     <div class="form-group">             <label for="">Enter Title</label>             <input type="text" class="form-control" name="title" id="title"/>         </div>         <div class="form-group">             <label for="">Enter Description</label>             <input type="text" class="form-control" name="description" id="description"/>         </div>         <div class="form-group">             <label for="">Enter Your Name</label>             <input type="text" class="form-control" name="post_name" id="post_name"/>         </div>         <div class="form-group">             <label for="">Enter Your Designation</label>             <input type="text" name="post_designation" id="post_designation" class="form-control"/>         </div>         <div class="form-group">             <label for="">Salary</label>             <input type="text" class="form-control" name="post_salary" id="post_salary"/>         </div>         <div class="form-group">             <label for="">Enter Joining Date</label>             <input type="date" class="form-control" name="post_date" value="<?php echo date('Y-m-d'); ?>" id="post_date"/>         </div>            <div class="form-group">             <label for="">Select Image</label>             <input type="file" id="post_img" name="post_img" src="<?php bloginfo('template_url'); ?>" value="" accept="image/*""/>         </div>         <div class="form-group">             <button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-pencil"></i> Submit</button>         </div>     </form> </div> 

$ (document).ready(function() { $ (“#enquiry_email_form”).on(“submit”,function(event){ event.preventDefault(); /* Clear result div $ (“#data”).html(”); */ var form= $ (this); var ajaxurl = form.data(“”); // var image = $ (‘#post_img’).prop(‘files’)[0]; var post_title = form.find(“#title”).val(); var post_description = form.find(“#description”).val(); var post_name = form.find(“#post_name”).val(); var post_designation = form.find(“#post_designation”).val(); var post_salary = form.find(“#post_salary”).val(); var post_date = form.find(“#post_date”).val(); var post_img = form.find(“#post_img”).val(); /*console.log(post_title); console.log(post_description); console.log(post_name); console.log(post_designation); console.log(post_salary); console.log(post_date); console.log(post_img);*/ /*if(detail_info.post_title === “” || detail_info.post_description === “” || detail_info.post_designation === “” || detail_info.post_salary === “” || detail_info.post_date === “” || detail_info.post_img === “”) { alert(“Fields cannot be blank”); return; }*/ $ (“.btn btn-primary”).text(‘submitting…’); $ .ajax({ url: “/wp-admin/admin-ajax.php”, type: ‘POST’, data: { action: ‘save_post_details_form_employee’, // this is going to be used inside wordpress functions.php post_title : post_title, post_description : post_description, post_name : post_name, post_designation : post_designation, post_salary : post_salary, post_date : post_date, post_img : post_img }, success: function(data) { //alert(“Insert Success”); //console.log(data); // Show successfully for submit message $ (“.submit-message”).html(‘Thank you for submitting’); } }); }); });