The way I see it, you have to acces your image with php rather then directly. So the picture should be something like
<img src="http://yourhost.com/image.php">
Inside image.php you should check what is the value of $SERVER['REMOTE_ADDR'] (for IP) and depending on it send appropriate headers for jpg and the content of a chosen file. Pseudocode would look like:
switch ($_SERVER['REMOTE_ADDR'])
{
case "x.x.x.x":
case "y.y.y.y":
$filename="image1.jpg";
break;
case "z.z.z.z":
$filename="image2.jpg";
break;
default:
$filename="image0.jpg";
}
SendJPGHeader();
SendContet($filename);