may be clean up your query parameters a little bit. Not sure of it, but as I tried out my codes with multiple variations, it worked just perfect !
According to you,
unlink('images/filename.jpg');
is working perfectly. Then, I see no reason why the other code is not working.
do something like: $image_id = trim($_POST["image_id"]);
and before deleting the file, please check, whether the file exists or not, that way, you will be sure where the error lies in.
$image_url = "images/{$image_id}";
if(file_exists($image_url)){
unlink($image_url);
} else {
die('file does not exist');
}