mirror of
https://github.com/kforney/kforney.github.io.git
synced 2024-11-14 11:00:09 -07:00
Performance enhancements: lossless WebP for background, lazy loading for video thumbnails.
This commit is contained in:
parent
8f7a17461e
commit
ade35bda2d
4 changed files with 2 additions and 1 deletions
|
@ -107,7 +107,7 @@ body, html {
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #161A25;
|
background-color: #161A25;
|
||||||
background-image: url("/img/branding/backgroundSmall.png");
|
background-image: url("/img/branding/backgroundSmall.webp");
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 13 KiB |
BIN
img/branding/backgroundSmall.webp
Normal file
BIN
img/branding/backgroundSmall.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 263 KiB |
|
@ -461,6 +461,7 @@
|
||||||
let image = new Image();
|
let image = new Image();
|
||||||
image.src = source;
|
image.src = source;
|
||||||
image.alt = "YouTube thumbnail image.";
|
image.alt = "YouTube thumbnail image.";
|
||||||
|
image.loading = "lazy";
|
||||||
image.addEventListener("load", function () {
|
image.addEventListener("load", function () {
|
||||||
youtube[i].appendChild(image);
|
youtube[i].appendChild(image);
|
||||||
}(i));
|
}(i));
|
||||||
|
|
Loading…
Reference in a new issue