From d81476ffc99554dee9d374f48a862b31550fd502 Mon Sep 17 00:00:00 2001 From: Edwin Steele Date: Sun, 4 Mar 2018 07:23:35 +1100 Subject: [PATCH] Galleria: Load first image earlier Galleria triggers loading of the main gallery iamge via javascript which has two problems. It only triggers the load when javascript has been processed and loads it at the same time as the second and third image which means it's competing with background images for bandwidth. We know that the first image will always be seen, so trigger a load in the document rather than waiting for js to do it. --- sigal/themes/galleria/templates/index.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sigal/themes/galleria/templates/index.html b/sigal/themes/galleria/templates/index.html index a8e9374..7948e2b 100644 --- a/sigal/themes/galleria/templates/index.html +++ b/sigal/themes/galleria/templates/index.html @@ -12,6 +12,15 @@ + {# We will always want to show the first image when we're on an album page #} + {# Start loading now for faster document complete instead of waiting for js to load it #} + {% if album.medias %} + + {% endif %} {% if settings.show_map and album.show_map %}