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 {