Another nice function is basename().
Example 1. basename() example
$path = "/home/httpd/html/index.php";
$file = basename ($path); // $file is set to "index.php"
$file = basename ($path,".php"); // $file is set to "index"
So perhaps:
if (basename($PHP_SELF) == "about.php") {
echo "<img src=\"me.jpg\">
}
else if ($filename ......
Enjoy!