FIX: Add unit to width and height CSS properties.

FIX: Add unit to width and height CSS properties.

diff --git a/app/assets/javascripts/discourse/lib/lazy-load-images.js.es6 b/app/assets/javascripts/discourse/lib/lazy-load-images.js.es6
index cd0c8e7..c6d70df 100644
--- a/app/assets/javascripts/discourse/lib/lazy-load-images.js.es6
+++ b/app/assets/javascripts/discourse/lib/lazy-load-images.js.es6
@@ -53,8 +53,8 @@ function show(image) {
     copyImg.style.position = "absolute";
     copyImg.style.top = `${image.offsetTop}px`;
     copyImg.style.left = `${image.offsetLeft}px`;
-    copyImg.style.width = imageData.width;
-    copyImg.style.height = imageData.height;
+    copyImg.style.width = `${imageData.width}px`;
+    copyImg.style.height = `${imageData.height}px`;
     copyImg.className = imageData.className;
 
     image.parentNode.insertBefore(copyImg, image);

GitHub sha: 35d0fd03

1 Like