lazy load images
This commit is contained in:
parent
390563be64
commit
092f3f0f7c
2 changed files with 2 additions and 2 deletions
|
|
@ -16,7 +16,7 @@
|
|||
class="card__images pdf-cover"
|
||||
style="aspect-ratio: unset"
|
||||
>
|
||||
<img :src="pdf.cover" alt="" />
|
||||
<img :src="pdf.cover" alt="" loading="lazy">
|
||||
</figure>
|
||||
<div v-else class="card__images" data-icon="document"></div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
:data-plus="images.length > 3 ? images.length - 3 : undefined"
|
||||
>
|
||||
<template v-for="image in images.slice(0, 3)" :key="image.uuid">
|
||||
<img v-if="image.url" :src="image.url" :alt="image.alt" />
|
||||
<img v-if="image.url" :src="image.url" :alt="image.alt" loading="lazy">
|
||||
<div v-else class="card__images" data-icon="document"></div>
|
||||
</template>
|
||||
</figure>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue