<% if (post.photos && post.photos.length) { %>
<% post.photos.forEach((photo, i) => { %> <% }) %>
<% } %>