Skip to content

Commit

Permalink
perf: lazy load images
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainLanz committed Jan 28, 2024
1 parent 5162797 commit c7621d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions resources/components/package_logo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function iconPlaceholder({ category }: PackageInfo) {
:alt="`Logo for ${package.name}`"
class="h-full object-contain"
:src="`/icons/${package.icon}`"
loading="lazy"
/>
<div v-else class="h-full flex items-center justify-center overflow-hidden rounded-xl bg-base3">
<i class="bg-grey inline-block text-lg" :class="iconPlaceholder(package)" />
Expand Down

0 comments on commit c7621d2

Please sign in to comment.