Skip to content

Commit

Permalink
perf: enable lazy loading for images
Browse files Browse the repository at this point in the history
  • Loading branch information
jwhx committed Oct 28, 2024
1 parent e03937b commit 4d4effe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/components/gallery/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
</span>
</div>
<div class="content" flex="main:center cross:center">
<img name="dragItem" :src="getImageUrlSync(item)" v-if="isImage(item)" />
<video name="dragItem" :src="getImageUrlSync(item)" v-if="isVideo(item)" />
<img name="dragItem" loading="lazy" decoding="async" :src="getImageUrlSync(item)" v-if="isImage(item)" />
<video name="dragItem" loading="lazy" :src="getImageUrlSync(item)" v-if="isVideo(item)" />
</div>
<div class="name" :title="item">
<span v-html="$options.filters.getFileName(item)"></span>
Expand Down

0 comments on commit 4d4effe

Please sign in to comment.