$image = base64_decode($this->input->post("image_base64_string"));
// decoding base64 string value
$image_name = md5(uniqid(rand(), true));// image name generating with random number with 32 characters
$filename = $image_name . '.' . 'png';
//rename file name with random number
$path = set_realpath('product/image/');
//image uploading folder path
file_put_contents($path . $filename, $image);
// image is bind and upload to respective folder