Skip to content

Commit

Permalink
perf: use async decoding and eager loading in images (#2437)
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
  • Loading branch information
ferferga authored Aug 29, 2024
1 parent 7acf5fe commit 83a1e84
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
<script type="module" src="src/main.ts"></script>
</head>
<body class="j-splash">
<img src="./icon.svg" alt="Jellyfin Logo">
<img src="./icon.svg" alt="Jellyfin Logo" loading="eager" decoding="async">
</body>
</html>
5 changes: 3 additions & 2 deletions frontend/src/components/lib/JImg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
<img
v-if="shown"
class="j-img"
v-bind="mergeProps($props, $attrs)"
:alt="$props.alt">
loading="eager"
decoding="async"
v-bind="mergeProps($props, $attrs)">
<template v-else>
<slot
v-if="$slots.placeholder"
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/lib/JSplashscreen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
:class="clientSettings.currentTheme.value">
<img
src="./icon.svg"
alt="Jellyfin Logo">
alt="Jellyfin Logo"
loading="eager"
decoding="async">
<JTransition
name="slide-y-reverse"
appear>
Expand Down

0 comments on commit 83a1e84

Please sign in to comment.