diff --git a/templates/shortcodes/gallery.html b/templates/shortcodes/gallery.html
index 3a9476fc11f3324123c4d41425cc2832c9470cdf..529e7d79497f29769c5bc4d808414e0fb97b569d 100644
--- a/templates/shortcodes/gallery.html
+++ b/templates/shortcodes/gallery.html
@@ -6,8 +6,8 @@
           <figure class="image is-4by3">
             {% set image = resize_image(path="@/" ~ page.colocated_path ~ "/" ~ picture.image, width=800, height=600) -%}
             <img src="{{image.url}}" alt="{{picture.alt}}" />
-            {% if picture.image.credits %}
-              <figcaption class="p-1 has-text-white has-background-black is-size-7 is-italic">{{ picture.image.credits }}</figcaption>
+            {% if picture.credits %}
+              <figcaption class="p-1 has-text-white has-background-black is-size-7 is-italic">{{ picture.credits }}</figcaption>
             {% endif %}
           </figure>
         </a>