Skip to content

Commit b968a4d

Browse files
committed
Update LQIP article
1 parent 16dd86f commit b968a4d

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

_posts/2023-09-28-the-ultimate-lqip-lcp-technique.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: post
33
title: "The Ultimate Low-Quality Image Placeholder Technique"
44
date: 2023-09-28 18:59:20
5+
last_modified_at: 2025-09-05
56
categories: Web Development
67
main: "https://csswizardry.com/wp-content/uploads/2023/09/csswizardry.com-lcp.jpg"
78
meta: "Can Low-Quality Image Placeholders and LCP play nicely together?"
@@ -553,6 +554,28 @@ In this particular instance, I bumped the quality up to 10, which came in at
553554
<img src="/wp-content/uploads/2023/09/just-right.jpg" width="760" height="577" alt="" loading="lazy">
554555
</figure>
555556

557+
## <ins datetime="2025-09-05">Verifying It Works</ins>
558+
559+
You can use the Element Timing API to verify that your LQIP image(s) are being
560+
loaded and rendered in the intended order:
561+
562+
```js
563+
const observer = new PerformanceObserver((list) => {
564+
list.getEntries().forEach((entry) => {
565+
console.log(entry);
566+
});
567+
});
568+
observer.observe({ type: "element", buffered: true });
569+
```
570+
571+
This should show you <var>n</var> separate entries for your LQIPs and your full
572+
image:
573+
574+
<figure>
575+
<img src="/wp-content/uploads/2023/09/lqip-verify.png" width="1500" height="964" alt="" loading="lazy">
576+
<figcaption>Three separate entries for my Base64 placeholder, my LQIP, and my final LCP image. <a href="/wp-content/uploads/2023/09/lqip-verify.png">View full size (89KB)</a></figcaption>
577+
</figure>
578+
556579
## Summary
557580

558581
In their attempts to prevent people gaming the system, spec writers have had to
86.9 KB
Loading

0 commit comments

Comments
 (0)