From 19db1261567273934112bd2e751157f19f384521 Mon Sep 17 00:00:00 2001 From: "Jakob L. Kreuze" Date: Sun, 28 Aug 2022 17:55:06 -0400 Subject: [gallery] Use faster static handler route for serving images --- haunt/static/js/gallery.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/haunt/static/js/gallery.js b/haunt/static/js/gallery.js index 29ed652..d7ed13b 100644 --- a/haunt/static/js/gallery.js +++ b/haunt/static/js/gallery.js @@ -50,9 +50,9 @@ if (!urlParams.get("g")) { for (let image of response.images) { elem = document.createElement("a"); - elem.href = `${location.protocol}//${location.host}/api/gallery/image?name=${image.filename}` + elem.href = `${location.protocol}//${location.host}/static-ext/${image.filename}`; let thumb = document.createElement("img"); - thumb.src = `${location.protocol}//${location.host}/api/gallery/image?name=${image.thumbnail}`; + thumb.src = `${location.protocol}//${location.host}/static-ext/${image.thumbnail}`; thumb.alt = `${image.title}`; thumb.title = `${image.title} - ${image.datetime}`; elem.appendChild(thumb); -- cgit v1.3