This generic format will work to make a hyperlink.
var text URL = "www.google.com";
var text Image = var text Image = "<img src = https://mycompany.quickbase.com/up/xxxxxxx/a/r111/e7/v0 & ">"
"<a href=" & $URL & ">" & $Image & "</a>" Replace the 111 with the Record ID# of the record holding the Image. and replace e7 with exxx where xxx is the fid # of the file attachment field
I believe that you can suffix the URL like this to get it to open in a new window
var text URL = "
www.google.com target=_blank";
This would be a Rich text formula field type. ' You may find that if this is being used on a report you may need to not allow the records to be viewed or else clicking the icon will also cause the record to be viewed.