On converting image in blob format getting wrong format and mysql is not allow to open getting error not a valid format.
$filePath = $targetDir."/".$_FI