Wrap img in link to high-res version

This commit is contained in:
Matthias Quintern 2024-11-10 18:37:27 +01:00
parent b1741f2b87
commit 641647a47f

View File

@ -156,8 +156,13 @@ function renderCurrentFile() {
const currentFileDiv = document.getElementById('current-file'); const currentFileDiv = document.getElementById('current-file');
currentFileDiv.innerHTML = ""; currentFileDiv.innerHTML = "";
if (currentFile) { 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); let element = createMediaFileElement(currentFile, true);
currentFileDiv.appendChild(element); a.appendChild(element);
currentFileDiv.appendChild(a);
} else { } else {
currentFileDiv.innerHTML = splash; currentFileDiv.innerHTML = splash;
} }