Hi Jon,
I would recommend that you use
Image selection form control for instance instead of
Upload file because it enables you to retrieve the image using
<img> tag for which you can also set
alt attribute. Then you to modify your transformation function so that it looks like the following:
<img src="~/CMSPages/GetFile.aspx?nodeguid=<%# Eval("MainImage") %>" alt="<%# Eval("alt") %>" />
Best regards,
Filip Ligac