Get image ALT tags from Media Library and display on a template

First, check that the current page contains the value (in this case, our image alias is 'mainImage'), then get the image from the library and display the URL and ALT tag: