Skip to content

Commit e47bd4d

Browse files
committed
feat: Enable lazy loading for images
Added `loading="lazy"` attribute to `<img>` tags to improve page performance by deferring offscreen image loading.
1 parent d19a973 commit e47bd4d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/views/404.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<picture>
1717
<!-- Source of the image: https://www.cleanpng.com/png-http-404-error-user-interface-design-google-chrome-2045552/ -->
1818
<source type="image/webp" srcset="../assets/images/confused-robot.png?as=webp">
19-
<img src="../assets/images/confused-robot.png" alt="Confused robot looking for the page" width="300" height="270" />
19+
<img src="../assets/images/confused-robot.png" alt="Confused robot looking for the page" loading="lazy" width="300" height="270" />
2020
</picture>
2121
<div class="action">
2222
<p>Don't worry, even robots get lost sometimes.</p>

src/views/index.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<header>
4444
<picture>
4545
<source type="image/webp" srcset="../assets/images/profile100w100h.png?as=webp" />
46-
<img class="clazz-profile-image" src="../assets/images/profile100w100h.png" alt="Profile picture of Balázs Varga, CTO @ Apter" width="100" height="100" />
46+
<img class="clazz-profile-image" src="../assets/images/profile100w100h.png" alt="Profile picture of Balázs Varga, CTO @ Apter" loading="lazy" width="100" height="100" />
4747
</picture>
4848
<h1 class="clazz-text-center">Balázs Varga</h1>
4949
</header>

0 commit comments

Comments
 (0)