You'll either need to generate a full URL, eg :-
<xp:image id="image1" style="height:50px;width:50.0px">
<xp:this.url><![CDATA[#{javascript:"http://www.example.com/NCLCMS.nsf/" + rowData.getUniversalID()+ "/$FILE/" + rowData.getColumnValue("attachmentnames")}]]></xp:this.url>
</xp:image>
Or do it old school in the form <a href=""><img src=""></img></a>