From 2185aba13509cf7d00852c7857bba83e00dd5fcd Mon Sep 17 00:00:00 2001 From: Djeex Date: Sun, 16 Aug 2026 14:12:07 +0200 Subject: [PATCH] Chrome HDR artefacting fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chrome's GPU rasterizer tiles large composited layers, and a lingering will-change: transform keeps an image promoted to one of those layers indefinitely — on HDR gain-map photos scaled down to fit the page, that can leave visible seam lines at the tile boundaries. Drop the hint once the fade transition actually ends so the image reverts to normal (non-promoted) painting afterwards. Co-Authored-By: Claude Sonnet 5 --- src/public/js/lazy.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/public/js/lazy.js b/src/public/js/lazy.js index e31518e..d0c62d7 100644 --- a/src/public/js/lazy.js +++ b/src/public/js/lazy.js @@ -32,6 +32,14 @@ window.addEventListener("DOMContentLoaded", () => { img.classList.add("loaded"); }; + // Chrome HDR artefacting fix + const clearWillChange = (e) => { + if (e.propertyName !== "transform") return; + img.style.willChange = "auto"; + img.removeEventListener("transitionend", clearWillChange); + }; + img.addEventListener("transitionend", clearWillChange); + if (img.complete && img.naturalHeight !== 0) { onLoad(); // already loaded } else {