From 28e9de4dc8d78c7c6a776b0db3e77debba2d0962 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Mon, 3 Nov 2025 00:57:44 +0100 Subject: [PATCH] fix: make sure to only decode thumbhash once --- static/thumbhash.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/thumbhash.js b/static/thumbhash.js index 2e74d83..6ba1c9a 100644 --- a/static/thumbhash.js +++ b/static/thumbhash.js @@ -229,8 +229,9 @@ function rgbaToDataURL(w, h, rgba) { function updateThumbhashImages() { document.querySelectorAll("[data-thumb]").forEach((entry) => { const hash = entry.getAttribute("data-thumb"); - + if (entry.getAttribute("data-thumb-decoded")) return; if (!hash) return; + entry.setAttribute("data-thumb-decoded", true); const decodedString = atob(hash);