diff --git a/layouts/partials/home/projects.html b/layouts/partials/home/projects.html
index ffcebc7..45a3a88 100644
--- a/layouts/partials/home/projects.html
+++ b/layouts/partials/home/projects.html
@@ -65,32 +65,29 @@
{{ end }}
{{ if .Params.project_timeframe }}
- {{ end }}
- {{ range sort . "Params.weight" }}
- {{ $image := .Resize "640x" }}
- {{ if $moreThenOneImage }}
-
- {{ end }}
-
- {{ if $moreThenOneImage }}
-
- {{ end }}
- {{ end }}
- {{ if $moreThenOneImage }}
-
- {{ end }}
- {{ end }}
-
- {{ with .Content }}
+ {{ end }}
- {{ . }}
+ {{ with .Resources.ByType "image" }}
+ {{ $moreThenOneImage := gt (len .) 1 }}
+ {{ if $moreThenOneImage }}
+
+ {{ end }}
+ {{ range sort . "Params.weight" }}
+ {{ $image := .Resize "640x" }}
+ {{ if $moreThenOneImage }}
+
+ {{ end }}
+
+ {{ if $moreThenOneImage }}
+
+ {{ end }}
+ {{ end }}
+ {{ if $moreThenOneImage }}
+
+ {{ end }}
+ {{ end }}
+ {{ .Content }}
- {{ end }}