The image url is always present and can't be hidden. Hiding the actual resource that holds the image data is possible though, but since your script provides access to it anyway, it doesn't really matter to the user if they know this or not. They still get their image through a specific url.
image.php
// error. perhaps display some default image?
if (!isset($_GET['id')) || $id = (int) $_GET['id']) == 0)
exit;
$im = somehowGetAnImageCorrespondingToId($id);
header('content-type: '.somehowGetMimeTypeOfImage($im));
somehowEchoTheContentsOfImage($im);
<img src="image.php?id=15" alt=""/>
The url is still just as visible as it ever was. That it retrieves data from a file called image_15.jpg or pulls out BLOB data from a DB or whatever else it might do is however unknown to the user.
The same goes for displaying transparent gifs and setting the background-image. It is still possible to see what the url for the background image is. It's just less convenient, and a serious and annoying breach in usability.
The image serving script does have some advantages though. You can require users to be logged in to view an image. Or have certain user access rights to view a particular image. Or store impression statistics for an image. Or serve different images depending on what user requests it. But hiding the url is not one of them.