Skip to content

Commit

Permalink
lazy load img
Browse files Browse the repository at this point in the history
  • Loading branch information
arily committed Jun 14, 2024
1 parent 3aee708 commit 75c31e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/app/score-list-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,13 @@ de-DE:
&& beatmap.beatmapset.source === BeatmapSource.Bancho"
>
<source v-if="beatmap.beatmapset.assets['list@2x']" :srcset="`${beatmap.beatmapset.assets.list} 1x, ${beatmap.beatmapset.assets['list@2x']} 2x`">
<img
<nuxt-img
loading="lazy"
:src="beatmap.beatmapset.assets.list"
:alt="autoLocale(beatmap.beatmapset.meta).title"
:onerror="placeholder"
class="object-cover w-20 h-16 shadow-md rounded-xl"
>
/>
</picture>
<icon v-else class="w-20 h-16" name="clarity:unknown-status-line" size="100%" />
</div>
Expand Down

0 comments on commit 75c31e2

Please sign in to comment.