Hola de nuevo.
A ve si te sirve este ejemplo:
Código:
<html>
<head>
<script type="text/javascript">
function ini() {
foto = document.images[0].src;
foto = foto.split('/');
document.getElementById('enla').href = "otra_pagina.php?imagen=" + foto[foto.length-1];
}
</script>
</head>
<body onload="ini()">
<img src="imagen1.jpg" />
<a href="" id="enla">Enlace</a>
</body>
</html>
Saludos,