Exclude non photo files

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1200738 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Tag/html.jsp b/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Tag/html.jsp
index f2130ff..0076eb7 100644
--- a/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Tag/html.jsp
+++ b/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Tag/html.jsp
@@ -21,6 +21,7 @@
                 org.apache.sling.api.resource.ResourceUtil,
                 org.apache.sling.api.resource.ValueMap,
                 org.apache.sling.api.request.ResponseUtil,
+                org.apache.sling.sample.slingshot.Constants,
                 java.util.Iterator"%><%
 %><%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0" %><%
 %><sling:defineObjects/><%
@@ -39,9 +40,12 @@
     final Iterator<Resource> fi = resolver.findResources("SELECT * FROM nt:file WHERE jcr:path LIKE '/slingshot/albums/%' AND slingshot:tags='" + name + "'", "sql");
     while ( fi.hasNext()) {
         final Resource current = fi.next();
-        %>
+        if ( current.isResourceType(Constants.RESOURCETYPE_PHOTO) 
+                && Constants.includeAsMedia(current)) {
+          %>
         <sling:include resource="<%= current %>" resourceType="slingshot/Photo" replaceSelectors="main"/>
-        <%
+          <%
+        }
     }
 %>
 </div>