lo puedes hacer con javascript. esto lo pones dentro del <head>
function cambiarImagen(){
if(document.getElementById('imagen').src=="http://localhost/imagen1.gif"){
document.getElementById('imagen').src="http://localhost/imagen2.gif";
}
else{
document.getElementById('imagen').src="http://localhost/imagen1.gif";
}
}
y el el body pones
Código HTML:
<img id="imagen" src="imagen1.gif" onclick="cambiarImagen()" style="cursor:pointer" />
cambia tu ruta y el nombre de tus imagenes y pruebalo