<% var galleryImage = WisP.getMediaByID(id, postMedia) %> <% if(galleryImage){ %> <%= galleryImage.altText %> <% } %>