Performance enhancements: lossless WebP for background, lazy loading for video thumbnails.

This commit is contained in:
Kaj Forney 2023-02-27 12:42:37 -07:00
parent 8f7a17461e
commit ade35bda2d
Signed by: kforney
GPG key ID: 3AB4E2E04CEF656F
4 changed files with 2 additions and 1 deletions

View file

@ -107,7 +107,7 @@ body, html {
body {
background-color: #161A25;
background-image: url("/img/branding/backgroundSmall.png");
background-image: url("/img/branding/backgroundSmall.webp");
}
a {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

View file

@ -461,6 +461,7 @@
let image = new Image();
image.src = source;
image.alt = "YouTube thumbnail image.";
image.loading = "lazy";
image.addEventListener("load", function () {
youtube[i].appendChild(image);
}(i));