mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-01 02:12:26 +00:00
Merge pull request #2089 from PR0M3TH3AN/perf/optimize-image-loading-18100036884515422238
⚡ Optimize avatar image loading with lazy/async attributes
This commit is contained in:
2 files changed
+5
-1
No files matched your search
@@ -503,6 +503,8 @@
|
||||
id="creatorAvatar"
|
||||
src=""
|
||||
alt="Creator"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
class="h-full w-full rounded-full object-cover cursor-pointer"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -904,7 +904,9 @@ export class VideoCard {
|
||||
const avatar = this.createElement("img", {
|
||||
attrs: {
|
||||
src: "assets/svg/default-profile.svg",
|
||||
alt: "Placeholder"
|
||||
alt: "Placeholder",
|
||||
loading: "lazy",
|
||||
decoding: "async",
|
||||
}
|
||||
});
|
||||
avatar.classList.add(
|
||||
|
||||
Reference in new issue
Block a user