From 641647a47f6379b9877b2a5de77f6d0d49a6cf6d Mon Sep 17 00:00:00 2001 From: Matthias Quintern Date: Sun, 10 Nov 2024 18:37:27 +0100 Subject: [PATCH] Wrap img in link to high-res version --- src/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index dcd58b6..d890c17 100644 --- a/src/index.js +++ b/src/index.js @@ -156,8 +156,13 @@ function renderCurrentFile() { const currentFileDiv = document.getElementById('current-file'); currentFileDiv.innerHTML = ""; if (currentFile) { + // wrap the file in link to the full resolution version served at images-full + let a = document.createElement("a"); + a.href = stagingPath.replace("images/", "images-full/") + currentFile; + a.target = "_blank"; let element = createMediaFileElement(currentFile, true); - currentFileDiv.appendChild(element); + a.appendChild(element); + currentFileDiv.appendChild(a); } else { currentFileDiv.innerHTML = splash; }