infatti come lo hai scritto tu l'immagine non è cliccabile...dovresti fare così:

writeln("<img src=\"" + url + "\" alt='Chiudi'>");